| ??? 10/10/05 20:20 Read: times |
#102197 - the "tricks" Responding to: ???'s previous message |
The problem is not in particular crystal frequency but in human lazyness. 1. one can count not seconds, but number of overflows; and calculate seconds/minutes/hours etc. when needed from it. Requires multi-byte division, but math libraries are readily available. 2. one can use reload the timer in isr so that an integer number of interrupts occur within a second. Th latency can be compensated by adding the current value to the (negative) reload constant. See Peter Dannegger's page for nice example. 3. A twist of the previous is, when with a suitable Xtal only THn is reloaded (within 256 cycles) - e.g. -180 or -240 for 11.0592MHz (homework: explain why it works) 4.8052 and "higher" have T2, which can run 16-bit autoreloaded (see also PCA at some derivatives) Caveat: XX MHz crystals often come in 50-100ppm precision... Homework: calculate daily error for 100ppm deviation. Jan Waclawek |
| Topic | Author | Date |
| Software Based RTC | 01/01/70 00:00 | |
| Context | 01/01/70 00:00 | |
| Link to my RTC - sftware crystal freq. | 01/01/70 00:00 | |
| The precision is depending on the fracti | 01/01/70 00:00 | |
| How to count seconds | 01/01/70 00:00 | |
| How to decide count for a 3.5795Mhz, | 01/01/70 00:00 | |
| the frequency range does not matter | 01/01/70 00:00 | |
| the "tricks" | 01/01/70 00:00 | |
| 3.93216MHz is better | 01/01/70 00:00 | |
| 4.915200 | 01/01/70 00:00 | |
| 3.93216 ?? | 01/01/70 00:00 | |
| 3.93216 is standard frequency | 01/01/70 00:00 | |
| Can i have some clarifications on XTALS | 01/01/70 00:00 | |
| manufacturing tolerances | 01/01/70 00:00 | |
| low frequencies Crystals are bigger ? | 01/01/70 00:00 | |
| 32.768kHz means low current consumption | 01/01/70 00:00 | |
| so higher Frequeny crystals are accurate | 01/01/70 00:00 | |
Yes! | 01/01/70 00:00 | |
| The Right Frequency | 01/01/70 00:00 |



