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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/01/07 07:32
Read: times


 
#140139 - Using the DS1307
Responding to: ???'s previous message
Farhan,

First of all try to read and write to the DS1307 registers using normal i2c routines.

Note that bit7 of register 0 is the "clock halt" bit. So unless you specifically clear it when you are setting the time, your clock will never run.

Also you will need to convert the DS1307 output back from BCD for your calculations.

The accuracy of the DS1307 is only as good as its XTAL. Your AT89C52 could also keep the time if its XTAL is good. The advantage is that the DS1307 should keep time from its battery backup.

So your timekeeping relies on a human setting the initial time and your device having sufficient stability to keep accurate time afterwards.

David.

p.s. as a suggestion to Craig. Surely 8052.com could handle tab to space conversion in postings, thereby keeping most people happy.


List of 26 messages in thread
TopicAuthorDate
DS1307 code problem for AT89C52            01/01/70 00:00      
   What have you got so far?            01/01/70 00:00      
      Things i have got so far            01/01/70 00:00      
         DS1307            01/01/70 00:00      
         Code layout            01/01/70 00:00      
         PHEW            01/01/70 00:00      
         Use GPS receiver for Lat, Day and Time            01/01/70 00:00      
            Very good idea!            01/01/70 00:00      
            excellent idea            01/01/70 00:00      
            Why Both            01/01/70 00:00      
               have you heard of this thing called "Google"            01/01/70 00:00      
         Comments on Formula            01/01/70 00:00      
            there is code for this at the Maxim website            01/01/70 00:00      
               GPS Receiver-Good Idea            01/01/70 00:00      
                  Why both??            01/01/70 00:00      
                  Using the DS1307            01/01/70 00:00      
                     re \"suggestion to Craig\"            01/01/70 00:00      
                        8052.com expanding tabs into spaces            01/01/70 00:00      
                           Just read            01/01/70 00:00      
                              Tabs, 8052.com and email            01/01/70 00:00      
                                 crunched by quoting AND email            01/01/70 00:00      
                                    Bug in quoting            01/01/70 00:00      
                                 pre tags            01/01/70 00:00      
                           it is not just the tabs            01/01/70 00:00      
                     TABs are entirely unreliable - just avoid them!            01/01/70 00:00      
   Tracking            01/01/70 00:00      

Back to Subject List