Have a look at paul borgmeier's clock routines.
It'll get you alot closer to real time.
Easy and Accurate Clocks without RTC IC
http://www.picbasic.co.uk/forum/showthread.php?t=2129
<br>
Have a look at paul borgmeier's clock routines.
It'll get you alot closer to real time.
Easy and Accurate Clocks without RTC IC
http://www.picbasic.co.uk/forum/showthread.php?t=2129
<br>
DT
Thanks, Darrel...great info.
I've never had an experience with the timer registers so I think I'll rewrite the stopwatch code just as a self tutorial.
I was just wondering, doing it the way I have based on build counters and instruction cycles there is a chance that the code could get corrupt and miscount as the pic would need a hard reset?
I suppose if you had a reference like the timer you could "reset" based on that or something.
I did see a strange count one time and that's all I could think of.
It'll be fun to study that material.
No, I don't think so.
All clock programs have to do the Seconds = Seconds +1 kind of stuff. It just depends on the Time Base that determines the accuracy.
We'd have to see the code to figure out if there was a Counting problem.
But in general, if the routine counts properly, it won't get corrupted. Well, except for a stray Cosmic Ray or two, every 10 years.
<br>
DT
Good morning,
Don't forget Melanie's Olympic Timer program! Measures in 1/100th of a second if I recall. AND it's written in plain English so you can easily follow what is going on in the program.
BobK
I'll search that and print it out.
Actually, my code works fine except for something that looked fishy one time...it's stays in sequence all the way to 59:59 and that's all that matters.
I spent a whole afternoon trial and error with PAUSEUS to get it right. (Too lazy to do the math to figure it out).
One thing I need to look at are the led displays...they could be a bit brighter but then there being fed by the constant loop of the 4 mhz Picbasic program. I'm sure if they were scanned at a lower frequency they would brighten up.
Bookmarks