Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
source:**broken link removed**Timer 2 has both a prescaler and a postscaler. It can be used as the PWM time-base in addition to normal
timing activities. There is no external clock input so it is driven solely by the internal processor clock. The
prescaler functions just like the prescaler of the other two timers, Timer 0 and Timer 1, and can have prescale
values of 1:1, 1:4, and 1:16. The postscaler is used in a different fashion and gives the timer added flexibility.
The other two timers overflow when they reach 0xFF (Timer 0) and 0xFFFF (Timer 1). Timer 2, on the other
hand, overflows when its value matches the value in the PR2 register. The PR2 register, which defaults to
0xFF on reset, is readable and writeable. The output of the comparison between Timer 2 and PR2 is then
sent to the postscaler which can have postscale values from 1:1 to 1:16.
This gives the timer much more flexibility to time events, unlike Timer 0 where it was necessary to offset it
on each overflow when timing events that could not be mapped to a multiple of 0xFF timer ticks.
T2CON @ 0x12h
bit 6-3 TOUTPS3:TOUTPS0: Timer2 Output Postscale Select bits
0000 = 1:1 Postscale
0001 = 1:2 Postscale
0010 = 1:3 Postscale
1111 = 1:16 Postscale
bit 2 TMR2ON: Timer2 On bit
1 = Timer2 is on
0 = Timer2 is off
bit 1-0 T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits
00 = Prescaler is 1
01 = Prescaler is 4
1x = Prescaler is 16
hi,
Prescaler: A circuit that slows the rate of a clocking source to a counter/timer.
OR
A prescaler is an electronic circuit used to reduce a high frequency electrical signal to a low frequency by integer division.
Postscaler: A circuit that slows the rate of the interrupt generation(or WDT reset)from a counter/timer by dividing it down.
Hi, I think :Gopal. Thanks... crisp clear and to the point.. this is what i was searching from past 3 hours