DS1302 extra ram I/O; how?
verobel
Posts: 81
Fellow Stampers;
I would like to read and write data to the ram memory in the 1302. I have code that sets up the clock and reads its values in burst mode; but I am having touble finding example code that shows how to write/read from the 31 bytes of ram. Is the whole 31 bytes available or are there only 7 bytes available if you are using the clock?
thanks, John
I would like to read and write data to the ram memory in the 1302. I have code that sets up the clock and reads its values in burst mode; but I am having touble finding example code that shows how to write/read from the 31 bytes of ram. Is the whole 31 bytes available or are there only 7 bytes available if you are using the clock?
thanks, John
Comments
·· There is an example of this at the following link.· I hope this helps.· Take care.
http://forums.parallax.com/showthread.php?p=531080
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I downloaded your program and it works fine. I think that the extra memory available on this chip should come in handy to many programmers that run out of register space and this seems to be a problem with Basic Stamps when many devices/sensors are attached. With this chip you could swap out/in blocks of variables as required and not have to worry about burning out eprom.
Do you know if the DS1307 has a similar extra ram on board and if your sample program could be used to drive it as well?
·
·· The DS1307 has a little more RAM in fact...And it too is backed up with a battery.· However the DS1307 doesn't have a charging circuit like the DS1302, so you cannot recharge your battery or use a Super-Cap for retention.· Also, the DS1307 is I2C interface.· While you could use it in a BS2, if you have a BASIC Stamp that supports I2C then you also have extra RAM in the form of ScratchPad RAM.· So you could use that as well.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com