Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/23/08 17:48
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#160235 - The best way...
Responding to: ???'s previous message
Ganesh Kumar.sw said:
I need C code for DS1302 RTC to interface with 8051 ...

The best thing for starters would be to read the data sheets for the MCU and the RTC devices. Actually read them a couple of times. Then verify the hardware design and how its hooked up. A good way to help verify that design is to write some simple starter routines that toggle parts of the MCU to RTC interface in a loop to permit observations of the connectivity on your oscilloscope and provide you confidence that you understand the way for getting code to manipulate the interface. Next go back and re-read the data sheets and search out any and all web resources you can find in terms of Application Notes from manufacturer sites. This effort should put you in the place of beginning to understand the interface protocol to the RTC so that you can then begin coding that up. At that point if you get hung up then come back here, show your schematic and the parts of the code that are giving you trouble and then maybe folks here can help you through the rough spot.

Doing MCU embedded development is not like going to a party and getting ready made little sandwiches and cookies off of a silver tray and sticking them in your mouth. Rather it is much more like being the creative host that pulls together all the ingredients to make all those sandwiches and cookies.

By the way: It would be rather interesting if you could tell us why you need this code what you are going to use it for.

Michael Karas



List of 3 messages in thread
TopicAuthorDate
RTC DS1302            01/01/70 00:00      
   Google it            01/01/70 00:00      
   The best way...            01/01/70 00:00      

Back to Subject List