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
by Duane Benson
by Jake Hertz
by Jake Hertz
by Aaron Carman