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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/14/04 14:16
Read: times


 
#62553 - RE: Memory and RTC
Responding to: ???'s previous message
That is the way I have used the same Philips RTC chip. I read it once per second or so. My main loop does its thing and has a timer interrupt that sets a flag every 250 milliseconds. As the main loop comes around and sees this flag set reads the RTC into internal RAM and then clears the flag. Depending on how you use the actual time values in the application you could adjust the period that this flag sets up or down. For ecample if you are using time to timestamp a datalog item then reading once a second is probably just right. On the other hand if you are continually displaying time on an LCD for a clock type display then reading 4 or 5 times a second is appropriate. In my application I mentioned I only display the clock in the HH:MM:SS format at the time of special user request so I have it designed so that I can turn my 250 msec period flag on and off based on what the user wants to see on the LCD.

As others have pointed out you need to study how much slower the clock is actually getting. Your 32.768 KHz crystal could simply be off a small amount. There are various ways to compensate for this.....some other RTC chips have the ability to calibrate the RTC via some fancy counter logic that modulates divider from crystal down to seconds by either adding or omitting clock pulses on a periodic way.....there are ways to apply a trimming and adjustment circuit to the crystal itself to pull it into the range that would be acceptable.....it may also be necessary to use a crystal that is fundamentally more accurate in the first place.......and lastly if you do have noise coupling from the rest of your circuit board into the oscillator of the RTC then you will need to re-do your circuit board with proper grounds and careful components and trace placement.

Michael Karas



List of 17 messages in thread
TopicAuthorDate
Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
      RE: Memory and RTC, erratum            01/01/70 00:00      
      RE: Memory and RTC            01/01/70 00:00      
         RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
      RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
      RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
      RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
   RE: Memory and RTC            01/01/70 00:00      
      RE: Memory and RTC            01/01/70 00:00      
         RE: Memory and RTC            01/01/70 00:00      
         RE: Memory and RTC            01/01/70 00:00      

Back to Subject List