??? 05/31/04 05:46 Read: times |
#71489 - RE: Cool Michael ! Responding to: ???'s previous message |
I want to log only date and time the ds1302 chip has only 26 bytes of nvram would that be enough and how many events could be logged, have any idea. Are you not able to figure this out???????? Under normal conditions a YY/MM/DD HH/MM/SS time stamp takes 6 bytes. With 26 bytes inside the RTC chip you could store 4 events. It is feasible to convert a time/date like this to a number of seconds since a reference point say such as 01-Jan-2000 @ 00:00:00. A 32 bit number (4 bytes) can then keep track of an event time over a span of about 135 years. Using this scheme you could store 6 events in the spare RTC RAM. If I were you I would instead use a serial EEPROM type chip. The 93C46 is very very cheap and holds 128 bytes of data organized in 64 16-bit words. This could hold 21 events with the 6 byte format and 32 events if you chose to use the packed seconds 4 byte format. Michael Karas |