Hello,
thanks for your reply. my friend has already analyzed the RTC solution. He wants something software that is included in a PIC also for further development, very low cost and very simple.
anything else ?
Hello,
thanks for your reply. my friend has already analyzed the RTC solution. He wants something software that is included in a PIC also for further development, very low cost and very simple.
anything else ?
There's a bunch of other idea that spring to mind. Is the unit will be battery powered or AC powered?
If it's AC powered, i would prefer to use the AC as timebase, use an internal timer interrupt to get the 1 Second or 1 minute. Once in the interrupt do the math and check for Alarm or Events.
BUT you can do it with the internal Tick FOSC/4, in this case use one of the lower Crystal frequency... let's say 4 MHZ => internal = 1MHZ => ticks every 1 uSec => internal timer interrupt every 1000 counts to have a time base of 1 Sec => you need a 16 bits Timer.
Wich PIC Marc will use ???
Process is almost the same than with an RTC but you'll have to deal with a bunch of more code line to take care of the days of week/month/year/Leap Year/hours/minutes... BLAH BLAH BLAH, tsé veux dire !!!
NOT impossible, a bit tricky, i agree.
What the unit will also do?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
HEllo
Marc make an automatic food system for Deer hunting. It's a little contract that ones of his neighboor ask for.
Marc use a 16F84A-4MHz. Unit will be DC powered.
He will get back to me soon. He actualy looking at some tricks mentionned here.
I Will let you know how is going with his tests.
thanks again!
Martin et Marc
Martin & Marc,
I just posted in the “Code Examples” area two examples of how to create easy clocks that track time in an HH:MM format. The examples do not require Real Time Clock (RTC) ICs and are based on 4MHz Crystals. They are highly accurate at < 2 sec /day error with a standard 4.000MHz crystal (with +/- 20ppm tolerance.)
Both examples use TMRO with prescalers set to 256. This method requires only about 30 lines of code to maintain accurate time.
The programs are named EZClock1.bas and EZClock2.bas. These files are mostly comment - the code is at the end.
Maybe these can help your friend -
Good Luck,
Paul Borgmeier
Salt Lake City, Utah
www.cruxanalysis.com
Bookmarks