Academic Program

Timer0 Project Output

Timer0 Project Output

Output Waveform

The oscilloscope capture below shows the result. The RA2 pin toggles every 2.52 milliseconds. This is a little longer than the settings in the TMR0 setup screen. This is because of the time it takes to toggle the pin and then re-initialize the timer0. If the timing is critical, then the value in the Timer0 setup can be adjusted to change the preload value that produced the desired overflow time.