TIMERS AND COUNTERS:TIMER OPERATION CONfiRMATION

TIMER OPERATION CONfiRMATION

To make sure a timer is working, set up a program in which the interrupt routine incre- ments a variable and the main loop displays it. If you see the variable incrementing, the interrupt routine is working.

The speed of the incrementing will give you some idea of the rate at which the interrupts are occurring and will confirm that the interrupts are occurring as fast as you have programmed them to.

Other timer related registers can also be looked at to see what is going on in them by displaying them on the LCD.

Caution Writing to the LCD is time consuming and will slow down the system.

Leave a comment

Your email address will not be published. Required fields are marked *