First page Back Continue Last page Overview Graphics
The firmware of the PIC16F84 (2)
We use the TICK variable that is incremented every 0.62 ms by the interrupt routine tied to the timer overflow TMR0 of the PIC
The PIC timer is programmed to yield interrupts at a 250Khz frequency (the 1Mhz CPU clock rate divided by the prescaler 4 ) and to start counting from 100 (TMR0=100)
In formulas:
250Khz / (256-100) = 1602 Hz ---> 0.62ms