OK, THANK YOU .
IF ALL THESE FACTORS( TEMPERATURE,crystal frequency, deviation over time......) HAPPENED: WHAT IS THE DEGREE OF ACCURACY DO YOU THINK WE WILL HAVE IN THIS SITUATION??
IS IT ACCEPTABLE ??
OK,THANK YOU.Untrimmed, a crystal could be +/-100ppm which means you could have 8.6 seconds error in 24 hours. If accuracy is important then you need to buy a crystal which is better than 100ppm and trim it to frequency. Then you will be left with temperature and aging effects.
Swapping to a 32kHz crystal will probably help because +/-20ppm is usually the worst tolerance you will find although that is still 1.7 seconds error in 24 hours if you don't trim it.
None of this negates the comments Tahmid has made about the use of delays and interrupts. I always use interrupts. If you want to use a delay loop and want some accuracy then you have to calculate the number of instruction cycles for every possible software route and compensate for it. That is too much like hard work compared to making a simple tick counter from an interrupt.
Keith.
thank you,Hi,
You can compensate by adjusting the time of interrupt by trial and error and checking which is most accurate and checking how close you get. It's possible and will require some experimentation.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?