In: Electrical Engineering
can anyone explain about PIC timers calculations and working
PIC18f67j50
PIC18F67J50 consists of five timers and one watch dog timer
Watchdog Timer 16-bit prescaler which allows extended time-out range to stabliZe the operating voltages and temperatures.watch dog timer can be controlled by WDTCON: WATCHDOG TIMER CONTROL REGISTER
Timer0 :- It can be operated as timer or as counter which is selected by T0CS bit data. when TMR0 REGISTER OVERFLOWS interrupt occurs.
TIMER1:- can be operated as timer and counter- asynchronous or synchronous.
when TIMER 1 REGISTER OVERFLOWS interrupt is generated which is indicated by TMR1IF
TIMER2 is incremented for every clock pulse and 4-bit counter gives direct input such as divide by 4 and 16 optionsThe value of TIMER2 is compared with Period register using comparator and When two values are equal the comparator generates a match signal which is used as reset signal.
TIMER2 CONTROL REGISTER is used to set TIMER2 ON and OFF, set divider as 1 or 4 or 16,
TIMER-3
TIMER3 increments for each rising edge of the TIMER1 external clock input.
TIMER3 CONTROL REGISTER is used to set or reset clock source as internal or external, to set or reset synchronous clock signal, to set divider as 1 or 4 or 16, to set or reset read/write operation, to set ECCPx/CCPx Enable bits
TIMER-4
TIMER-4 used for Capture, Compare and Pulse-Width Modulation
TIMER4 CONTROL REGISTER is used to set TIMER4 ON or OFF, set divider as 1 or 4 or 16,