Resource icon

Accurate 1-second periods with any xtal 2011-02-13

Mr RB

Well-Known Member
Mr RB submitted a new article:

Accurate 1-second periods with any xtal - Here are some easy C code examples to generate 1-second (or any period) from any xtal value and any


Read more about this article...
 
Hi Birdman, sorry I didn't state that very clearly. I meant that the third example is easier to convert to assembler because the main variable fits in a 2byte (unsigned int) variable instead of 3 or 4 bytes needed for the unsigned long var in assembler.

But with a 2byte variable 1 second = 62500 so it is not as finely tuneable as the top example. It is still tunable to within about 1.5 seconds a day which is better than most household clocks.
 
Hi
I'm a complete newbie when it comes to C. Are there any "packages" of code which I might use to vary timings related to bottle filling? I was thinking of using an old (ancient!) laptop to give a more accurate fill-level than the timer circuit I currently use.
Many thanks, and best regards
Ken
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…