twice a day
NamNori
Posts: 4
Looking for some advice... I'm wanting to use the propeller to toggle an IO pin twice a day (i.e. start at low, then at time X set HIGH, then some time Y later, perhaps even 8 hours later as an example, set LOW, then repeat the next day). My first thought was to leverage the DS1302 RTC chip which could certainly drive the prop IO to go HIGH at 10:00AM, then LOW at 8:00PM. But perhaps this is over-kill and there is a simpler way to attack this?
Thoughts?
Thanks!
-marc
Thoughts?
Thanks!
-marc
Comments
Here's a link to a clock object in the Propeller Object Exchange. There are also DS1302 drivers in the ObEx if you want to go that route. Search there for DS1302.
The simple logger in propforth uses the interanl counter as 64 bit (double), and thus provides unique microsencond timestamp for like 7,000 years. After you calibate for drift, its nuts-dead-on as long as the temperature doesn't change. If the temperature change is cyclic, warm in day cool at night but consistent, it drifts in and out and stays pretty much on. The drift is microseconds so its less than the error read or setting the time in many cases, and you can adjust for you specifial situation.
Simple logger needs no extra parts. If you have more than 32k of records to store, you can add an SD card and go for zillions of records. If you are not logging (why not, its free), you don't even need an SD.
Besides the other excellent suggestions posted, you need to determine if you need to do that at the same clock time (i.e: 8AM) each day or not. If yes then you will need an RTC since there will be no way to know what time it is after a reboot in case of a power failure or other event that results in a reboot.
Alex