> ISRs should be as tiny as possible. Definitely. I suggest 2 interrupt routines as follows: 1) interrupt on timer every 10 or 20 milliseconds; increment count of timer tick seen; read instantaneous state of switches/buttons inside timer tick ISR 2) handle UART interrupts by reading chars into input buffer or sending chars from output buffer. Only update buffer counts & pointers in ISR. Outside of interrupt service routines... Process timer tick in main (non-interrupt) code whenever count is non-zero, do switch/button debounce, and flag other process(es) to run as needed in main code, then decrement timer tick count. Use a tick count (not a flag) so that if the UART (at high baud rates) ties up the CPU for a while as it sends a block of data, any wall clock timer you are trying to keep updated will not "loose time". Frequently, the main code executes so rapidly in response to a timer tick that you can read the switches/buttons in the main code (not in ISR). Debounce is handled in main level timer tick process. Some process in main code empties UART input buffer. Some other process (or the same process) fills UART output buffer. Read up on circular buffers in OS text books; basically, for each buffer, you need a char count, a pointer for filling, & a pointer for emptying. Lee Jones -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist