Why not, XOR the port bit in the ISR routine and not only save some typing, but also have the function in one place., or set a flag in the ISR and then XOR the port bit in your main code? Colin -- cdb, colin@btech-online.co.uk on 12/09/2009 Web presence: www.btech-online.co.uk Hosted by: www.1and1.co.uk/?k_id=7988359 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist