I use XX.000 MHz crystals all the time and never have the need for any "complicate correction algorithms" by my use of Timer2 to set the rate.There is no reason to employ complicate correction algorithms, which are needed for instance when using 8 MHz crystals.
It is complicated at least in assembler. A little easier in C.I use XX.000 MHz crystals all the time and never have the need for any "complicate correction algorithms" by my use of Timer2 to set the rate.
Using an odd frequency crystal is fine and well if your design can tolerate such. As mine is running a USB bus I'm constrained as to the crystal value used.
Haven't you divided by 4 twice on the first line? You started with 10MHz/4 = 2.5MHz, then divided by 4 again?????(((clock/4)/PreScale)/Count)
(((2.5MHz/4)/8)/65,536) = 4.768... Hz, or 0.210... times a sec.
The rate is the clock rate divided by 4, or 10MHz /4 = 2.5MHz
|Thread starter||Similar threads||Forum||Replies||Date|
|M||TIMER1 2LSBs always read as high. PIC16F15324 xc8||Embedded Systems and Microcontrollers||1|
|P||Pic18F87k22 xtal prescaler timer1 problems||Embedded Systems and Microcontrollers||5|
|PIC18F45K22 Timer1 Assistance required||Embedded Systems and Microcontrollers||9|
|STM8S Timer1 input capture issue||Embedded Systems and Microcontrollers||3|
|L||Programming Timer1 on the Atmega328p||Embedded Systems and Microcontrollers||2|