Solved

The DS1216 and 68HC11 read/write problem

Posted on 2002-04-13
9
455 Views
Last Modified: 2013-12-09
I AM WORKING WITH THE MOTOROLA 68HC11F1.
I AM TRYING TO MAKE A ROUTINE WHICH READS AND WRITES A
DALLAS DS1216C (REAL TIME CLOCK) AND/OR DS1202 SERIAL RTC
BUT UNTIL NOW IT DOESN'T WORK.
I MADE A SIMILAR ROUTINE FOR THE 8031/51 AND IT WORKS FINE.
FIRST I NEED A ROUTINE FOR THE 68HC11.

0
Comment
Question by:Shumba
9 Comments
 

Expert Comment

by:pcmochanix
ID: 7023483
68HC11 BOOTSTRAP COMMUNICATION ADAPTER Does this ring a bell? I may have the program and script you need.
0
 

Expert Comment

by:rgoff
ID: 7142050
0
 
LVL 3

Expert Comment

by:sburck
ID: 7247419
Best I can offer you - Dallas gives C source codes for accessing the DS1216C in this application note:

http://www.maxim-ic.com/appnotes.cfm/appnote_number/1091

You get find a C-compiler at

http://www.faqs.org/faqs/microcontroller-faq/68hc11/

And take it from there.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:ericsteimle
ID: 7290146
Hmm have you considered that 68HC11F1 and 8031 have a different byte order?  Re one is little endian the other is big endian.  So hex 80AA on one is AA80 on the other?  Sorry if you already knew that but it's a common mistake going from intel to moto style chips.

Regards,
Eric
0
 

Expert Comment

by:quirkyquirky
ID: 7299432
0
 
LVL 1

Expert Comment

by:MacDave
ID: 7761793
You imply that you have tried writing code to do this which does not work.  

If you posted that code it might be easier to help you fix the problem...

--Dave
0
 

Expert Comment

by:meltbrink
ID: 7844522
Have you checked and double checked your timing of the control and data signals on the uP  (Th,Tl and hold times),
These must be in spec in order to achieve effective communications between any two devices.

enjoy
0
 
LVL 1

Expert Comment

by:HWhacker
ID: 8123688
Ask the obvious questions first (please pardon me if I'm reiterating the obvious).  I know this one is flagged as "answered", but others always look to see if their problem is the same:

I presume you've verified the 'HC11 is NOT attempting to access any part of the DS1216 SmartWatch memory for unexpected cycles while you're reading the address sequence to unlock the RTC... things like IRQs or stack access will get you every time.
  Similar things occur if the address decoding for the Watch/memory is not bulletproof and you're using the 'F1 registers, internal RAM or EEPROM: the addresses and R/W show up outside.
  Beware also that the HC11 does "dummy" reads from address FFFF during many instructions which might break the sequence.  Motorola's M68HC11RM/D reference manual (downloadable from their site) gives cycle-by-cycle detail of each instruction's bus accesses.

Next: with the DS1202, are you using the SPI or directly manipulating port bits with your code? Have you paid attention to the "idle" data and clock states the HC11 SPI (or your code) generate? When I was looking at SPI applications, I found inconsistency among manufacturers and would need to invert the clock to keep some devices happy.
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8281374
All,
I am unlocking this question in preparation for cleanup.  I will return in 7 days to finalize this question.  Please leave any recommendations for the final state of this question, I will take all recommendations into consideration.  Failing any feedback, I may decide in 7 days to delete or PAQ this question with no refund.  Thanks.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Soddering on the board 11 155
Windows 10 update bricked my Dell Inspiron  3520 laptop 17 166
Which memory brick is defective ? 8 100
Audio and image stuttering issue 24 118
As you can read I recycle all my old hardware and the time has come that my power supply of 200 Watt cannot provide enough power for my backup server. I have lots of Compaq power supply's laying around, so I figured to use one of these PSU's. I t…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question