3.2 Timer0 Setup
Code also needs to be added to the main routine to set up and enable the timer, enable timer interrupts, and change the latch assignment, now that the variable value changes are performed in the interrupt service routine.
To enable all interrupts, ei()
is used, defined in
xc.h
.