Interrupts are the name of the game for more functional microcontroller firmware. [Rajendra] just posted a tutorial covering all of the interrupt types for the PIC 16F688 microcontroller.