Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

The DS1216 and 68HC11 read/write problem

Posted on 2002-04-13
9
Medium Priority
?
501 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

885 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