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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Sasha Jevtic
12/26/05 12:53
Read: 606 times
Barrington, Il

#105972 - Do not manipulate during update cycle
Responding to: Zia Banihashem's previous message
Zia Banihashem said:
Thnaks dear Eric and Sasha
I don't have any problem reading or writing the RTC, but acording to the datasheet and what Eric said the time data is not accessible by the user unless the SET bit is set to '1', but I don,t see such a thing now and I read and change it without setting it(and I do not use the Update Ended Interrupt),
anyway when there is no problem with it let it work ;)
thank you all for paying attention

best regards, and happy Christmas

First, you have the functionality of the SET bit confused. When the SET bit is 1, the time in the user-accessible registers will not be updated. Regardless of whether SET is 0 or 1, however, you can still read the time values from the '12887.

Secondly, It is not surprising that you have code that seems to work manipulating the RTC without paying attention to the update ended interrupt or using the set bit. And that code will likely work the vast majority of the time. However, every so often, you are going to be attempting an RTC operation at the exact moment that the time is changing, and you will not get the expected result! Such a malfunction will likely be rare, but in many embedded systems, this is just not acceptable. The precautions provided to prevent you from manipulating the RTC during an update cycle are there for a reason; use them!

--Sasha Jevtic

List of 5 messages in thread
Something strange with DS12887      Zia Banihashem      12/22/05 07:42      
   MMIO      Erik Malund      12/22/05 08:42      
   DS12887 SET bit      Sasha Jevtic      12/23/05 01:33      
      DS12887 SET bit      Zia Banihashem      12/25/05 09:35      
         Do not manipulate during update cycle      Sasha Jevtic      12/26/05 12:53      

Back to Subject List