help me, 2 seconds time error in along delay time

Status
Not open for further replies.
My replies may be superceded by later posts, however:

 
thank you, MR JimB
i plan to use asmall crystal from awatch (( i think it is 32768 HZ)). and to apply the same code to the pic after modifying numbers in delay loops.
i think this crystal is accurate and temperature compensated, because it is used in watches for timing purposes.
do you agree with me?
 
Last edited:
Accurate yes, temp compensated I would think not.

if it is not temp compensated ,then, how they use it in watches and these crystals are working all the time(( for years)) without significant errors in time???
 
Last edited:
if it is not temp compensated ,then, how they use it in watches and these crystals are working all the time(( for years)) without asignificant erroe in time???

It doesn't need to be temperature compnsated, it's accurate enough without.
 
i think the error was resulted from actual frequency of crystal.
because i thought the frequency was exactly 32.768 KHZ , but when measuring its frequency with amultimeter , it was
26.5 KHZ!!!!!!!!!!!!!!!!!!!! i was very surprise.
 
i think the error was resulted from actual frequency of crystal.
because i thought the frequency was exactly 32.768 KHZ , but when measuring its frequency with amultimeter , it was
26.5 KHZ!!!!!!!!!!!!!!!!!!!! i was very surprise.

You can't measure frequency in that way - that's why it was wrong.
 
is there any way to determine exactly the frequency of the crystal??
can i use ordinary oscilloscope?

As long as you use a scope with a x10 probe you can monitor it - but really there's little need to - the crystal is labelled with it's frequency, and will be more accurate than the scope.

You really need a trimmer capacitor on the crystal, and adjust it for good time keeping, just as you would adjust a mechanical watch.

But using a less obselete PIC, and using TMR2 to giver regular interrupts is an easy way to make a pretty reasonable clock - your massive delays version is pretty poor.
 
can you please give me an accurate delay code?
and,what is the value of the trimmer capacitor you suggest ?
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…