PIC Microcontroller Timer Basics
PIC Microcontroller: Timer Basics PIC18F4550 has four timers.
Timer0:
- Timer0 can work as Timer/Counter in both 8-bit and 16-bit modes
- Count registers: TMR0 and TMR1
- Timer control Register T0CON
- Timer flag bit TNR0IF
Timer1:
- Timer1 can work as a 16-bit timer or counter
- Count registers: TMR1H and TMR1L
- Timer control Register T1CON
- Timer flag bit TNR1IF
- Timer1 can be multiplexed with other peripherals like ADC etc. and generates special event triggering for CCP (Capture, Compare and PWM) events.
Timer2:
- 8-bit Timer
- Timer and Period registers: TMR2 and PR2, respectively
- Software programmable prescaler (1:1, 1:4 and 1:16)
- Software programmable postscaler (1:1 - 1:16)
- Timer Flag bit TMR2IF
- Optional use as the shift clock for the MSSP (Master Synchronous Serial Port) module
Timer3:
- Timer3 can work as a 16-bit timer or counter
- Timer count registers TMR3H and TMR3L
- Flag bit TMR3IF
- Timer3 can be multiplexed with other peripherals like ADC etc. and generates special event triggering for CCP (Capture, Compare, and PWM) events.