Solved

The DS1216 and 68HC11 read/write problem

Posted on 2002-04-13
9
442 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

So, if your PC is old or new and it does not boot or has no display then what do you do? Precautions : -During connecting or disconnecting devices, be sure to have the AC electrical power disconnected -Temporarily ground yourself, or use a wris…
Hello It is a very old trick to use a ram disk in order to boost PC performances, in the past, when in home environments the fastest common devices were floppy disks a part of the very small ram memory available was used to create a virtual hard …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

13 Experts available now in Live!

Get 1:1 Help Now