Solved

The DS1216 and 68HC11 read/write problem

Posted on 2002-04-13
9
454 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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 …
Or at least that’s the word according to a new blog from Tech Target on AWS’s new Managed Services (MS) offering. According to the blog, AWS is launching their AWS MS program to expedite the adoption of cloud by Fortune 1000 and Global 2000 companie…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

860 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