On the other hand, using the ICD, I would trace the first time through the keyboard interrupt, and see what's getting corrupted. Is your compiler generating the correct interrupt return code? There's a special return instruction for that (retfie 1). Neil -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist