Thank you for the time and effort you put into that very nice "how to" article Bill.The boards I make are single sided, and I don't have any problem using wire jumpers. It is my norm. Home brewed boards like this run less than $5, the only hard part is the template for the board itself. That is where the time goes.
I was thinking of laying out one for this project.
How I make PCBs
You got a link to this project?I recall spending about six (6) hours wiring up the single chip six digit Charlie Clock/Calendar/Timer (below)... Whew!!! (lol)...
What problem, please?C software is using an interrupt I can see (that's a good thing)
Your Xtal / crystal will have a rating too.
20ppm means that it could drift +/- 20Hz for every given every MHz
I notice that the Xtal in use is a 16MHz type.
Can you see the problem given what I have just told you?
Most clocks use a rather much lower crystal frequency for greater accuracy.What problem, please?
How does frequency affect accuracy?Most clocks use a rather much lower crystal frequency for greater accuracy.
But if it works within +/- 1 min p/month then who cares.
+/- 2 min is the bench mark for a satisfactory clock.
Higher frequencies consume more power to begin with as well. it's complex.How does frequency affect accuracy?
Actually, it works exactly like that in software. You divide a 16,000,000 Hz crystal frequency by 16,000,000 for a 1 Hz frequency (1 second period) and you divide a 32,768 Hz crystal frequency by 32,768 for a 1 Hz frequency (1 second period).You are right with what you're saying, but we're talking software here. It doesn't quite always work like this with software.
I'm sorry, I don't understand your comments. Are we still talking about accuracy?
I'm sorry (again). I don't understand your comment. The "ideal" crystal frequency probably depends on the application. A 32768 Hz crystal may indeed be the best choice for a battery powered application, but, the frequency doesn't really have anything to do with accuracy...For a software clock, 4MHz isn't the ideal frequency either really.
So I am calling the kettle black.
Whose source code?<snip>
Do you see anywhere in my source code where I am simply dividing 4,000,000 Hz by 4,000,000 ?
Yeah, if I just allow the µC's timer to overflow with (n) count it doesn't equate to an accurate clock like I have now. Logically it should but it just doesn't work like this. I have some offsets in place through trial and error real world testing.There is no magic frequency involved. A 4Mhz crystal, designed properly (especially with crystal ovens, which is true of any crystal) is just as accurate as any other crystal. Higher frequencies are actually more adjustable, as you add or remove ticks per RB's method to improve accuracy. This kind of thing can only be done on programmable devices though, such as µC.
Not sure what to think. Quite a few programmers have raised this issue. One guy with a phd posted some code on a forum with acknowledgements of the problem coupled with claims about averaging overflow of tmro. Accurate over the long period but inaccurate in the short I believe.Perhaps you're not running the timers correctly. Have you considered asking for help?
|Thread starter||Similar threads||Forum||Replies||Date|
|Logic circuit projects issue||Homework Help||26|
|R||6 Digit Passcode Project||Homework Help||14|
|4 Digit Green LED 12/24hr project clock for vehicle||General Electronics Chat||22|
|X||two digit object counter project help||General Electronics Chat||3|
|Project: PIC 4-Digit Single-Chip 24 Hour Clock||General Electronics Chat||21|
by Jake Hertz
by Jake Hertz