That'll get you a lot closer... 9.984msit needs to be T0CKPS 1:256
If you use the postscaler you can get 10.000ms:
- set prescaler to 1:32 T0CKPS<3:0> = 0101
- set postscaler to 1:10 T0OUTPS<3:0> = 1001
- set period count = 125 (load TMR0H with 125-1=124)
gets you 32 x 10 x 125 x 250ns = 10.000ms
For 32MHz, just change the prescaler to 1:64:
64 x 10 x 125 x 125ns = 10.000ms
Bookmarks