DS1302 RAM Locations
![hmlittle59](https://forums.parallax.com/uploads/userpics/199/nCR6ABWFQF1HY.jpg)
Hello all,
I'm learning to Write/Read to the Ram locations of the DS1302. But I have a noticed that on (Reset/removal of pwer) that my values some time stay in place. I've let it sit for 10mins. and on power up the value still seem to be there. Does the RAM locations some times retain there previous values or on power up does it always reset to a know state(00,11,*,...etc)? thanks
Seconds Location appears to always be $80 when NOT programed. This is how I know to load my default times, I'm not sure about the RAM Locations??
1) Does the DS1302 have a constant power up state?
2) Does it some times retain values in RAM?
thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
I'm learning to Write/Read to the Ram locations of the DS1302. But I have a noticed that on (Reset/removal of pwer) that my values some time stay in place. I've let it sit for 10mins. and on power up the value still seem to be there. Does the RAM locations some times retain there previous values or on power up does it always reset to a know state(00,11,*,...etc)? thanks
Seconds Location appears to always be $80 when NOT programed. This is how I know to load my default times, I'm not sure about the RAM Locations??
1) Does the DS1302 have a constant power up state?
2) Does it some times retain values in RAM?
thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
Comments
thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
On our schools weather station, I use this feature to remember which memory location was last used in the EEPROM that stores the logged data. I have two NiMH AA cells on the secondary power pin that keep the clock and ram active during the frequent power drops we experience at the school. I also use the ram to accumulate the data prior to writing to the EEPROM. This allows me to capture the data that was read before the system lost power.
I've posted the code at http://forums.parallax.com/forums/default.aspx?f=21&m=265354
1) DS1302 running....Yes/NO
2) Load Default times if NO
3) start DS1302
4) Check AUTO-CONFIG....ON/OFF
5) Load previous saved defaults if not first time running of DS1302 and AUTO-Config. is ON
6) Start Pass...Main Menu if from a reset
7) Also Remember to set a flag when returning to Bank0 to by-pass start-up chks.
8) Write 2 Separate set of 8 values to DS1302 memory
9) Read same set of values and display to Debug screen.....
I will add the BackLight LCDscreen also. Then make any corrections that ya'll suggest that I over looked.
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
What state the cells start with after remaining unpowered for some time probably depends partly on small manufacturing variations in cell geometry unless the RAM is actually designed to start in a particular state (like zeros). Beau would have a better idea how these things work.
thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering