Academic Program

Timer0 - Setup

Timer0 - Setup

Step 7 - Timer0 needs to be setup. Click on TMR0 under Project Resources to make the Timer0 setup screen appear.

tmr0menu.png

 

Timer0 will be driven by the instruction clock which was set up in step 5.

  1. Check the Enable Timer box.
  2. Set Clock Source to FOSC/4 (this is the instruction clock).
  3. Set the Clock prescaler box to 1:256.
  4. Set the Timer Period to 250 ms (The reload value should automatically adjust).
  5. Check the Enable Timer Interrupt box (This will add the Interrupt Manager to the Project Resources).

The window should look like this after the setup:

tmr0.png