Timer vs clock
AIman
Posts: 531
If I know when I want a buzzer to sound and know that it will happen at the same time every day can I run a timer instead of a clock?
Example
1000 = 1 second
60000=1 minute
86400000 = 24 hours
Loop until the correct counter is reached
Do while counter >= 24hours
puase 1000
Loop
Would that create the same effect as hooking up a clock and saying at 8 am beep? In otherwords an oversimplyfied alarm clock?
Example
1000 = 1 second
60000=1 minute
86400000 = 24 hours
Loop until the correct counter is reached
Do while counter >= 24hours
puase 1000
Loop
Would that create the same effect as hooking up a clock and saying at 8 am beep? In otherwords an oversimplyfied alarm clock?
Comments
So, if your program indeed spends most of its time in the PAUSE statements, it should be fairly accurate over moderate stretches of time (days to weeks), but will probably need calibration and compensation because of accuracy limitations of the resonator.
Getting the time keeping chip would be easier.
Thanks.