On 10/19/05, Laszlo Zsolt Nagy wrote: > Now that this is working, I plan to create an interrupt handler; so that > when a command arrives from the COM port, > the PIC will process it immediately; but do its normal tasks otherwise. > One command will be two or four bytes (sent > over the USART). I think I need to create a tiny stack and fill it up in > the interrupt handler. Finally, process the command > only after all of command bytes has arrived. > > I have never written an interrupt handler. I read the docs about > interrupts, but I'm not sure how to start. Can you please > point me to an example? (Especially, 18F452 or compatible, if possible.) > The documentation only has code fragments, > not a complete program. It would be easier to understand a working > example than develop from scratch. [Microchip Application Notes AN774] http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en012073 -- WH Tan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist