WH Tan wrote: > I see you have experienced some problem with PIC interrupt - from > initially USART to now external INT. Have you considered to > experiment with a timer interrupt instead? I think a timer is more > easier to set up since it doesn't depend on external event. And it > much more simple to test it in MPLAB SIM. I have tested my code in MPLAB SIM (under wine), and found it working. After some googling about PIC and interrupts problems, I have found the following: http://www.motherboardpoint.com/t93255-interrupt-not-firing-on-pic18f.html I checked that in my code (based on the Bradley Minch's USB firmware) I had the _DEBUG_ON_4L option set. After I replaced it with _DEBUG_OFF_4L, the interrupts started to work! I'm quite surprised, that setting of this option breaks interrupts... In the datasheet (39632D.pdf) there is nothing about it... -- Regards, Wojtek -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist