Solved

The DS1216 and 68HC11 read/write problem

Posted on 2002-04-13
9
445 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DL380 GEN 9 Memory Population 3 100
PC won't boot from CD 20 100
RCA analog audio to Bluetooth transmitter 19 244
USB ports on desktop not working 10 41
System overheating may become a serious problem if not taken care of at the proper time. I am writing this article because I faced a similar problem. Intro All electronic devices produce heat, but computers are a special case - the processors bo…
Introduction: When experiencing some peculiar problem with the functioning of your PC, how many times has it happened that you look for a solution and even google can’t help? It could be that you are one of the only few people on earth who ma…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now