View Full Version : bs2pe interfacing with real time clock
04-27-2006, 01:43 AM
have never used the ds1302 (real time clock) would it be hard to log time real time to the eeprom for every event recorded?
is there an example anywhere someone have used real time clock has a logger using the
i did go over the example to run the real time clock in parallax downloads but nothing refering has a logger.
thanks for any links
04-27-2006, 03:07 AM
·· It really depends on how much data you need to store and at what interval.· There are two ways to log data.· One is at a fixed interval.· In a situation like this you only need to store the date/time information once, since all the other samples would have a known sample interval.· The second method is event logging, and that could require a varying number of bytes depending on how much information you're storing.· The number of bytes of data plus the number of bytes of date/time information will dictate how much you can store.· And you would simply write this data, then increment your pointer by that number of bytes.
Parallax Tech Support
04-27-2006, 04:24 AM
Chris wrote a thorough tutorial on using the DS1302:
For Data logging, you might find the manual for Scott Edward's data collection proto board of value: www.seetron.com/obs.htm (http://www.seetron.com/obs.htm)
The OWL2pe data logger is based on the BASIC Stamp 2pe, and the manual talks about how to use the DS1307 in the context of data logging:
Parallax Stamp in Class volume on Applied Sensors uses the BASIC Stamp as a data logger.
04-28-2006, 03:20 AM
·· Your post reminded me that I had some feedback for pending improvements to that code and so I made them and reposted the new code to that thread in place of the old code.· One of the suggestions was a template since many people didn't know what to remove from the demo code to use the DS1302.· I should've done that right from the start so I included it.· And your advice in the other thread about storing pointers and other NV data that gets updated more frequently is spot-on.· The DS1302 RAM is backed up along with the Clock when using a battery.·
BTW, I liked your code for spanning multiple slots using STORE in one formula.· Simple, yet powerful.
Parallax Tech Support