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.

Comments

Popular posts from this blog

80386 pins and signals , 80386 modes , 80386 system design and 80386 i/o

Multi-Tasking and Real-Time Operating Systems:Random Number Generator

Advanced PIC18 Projects—SD Card Projects:Using the Card Filing System