Brooke Clarke wrote: > You found it. I had commented out the bcf PORTB,7 but NOT the preceding > code related to testing for it's need causing the btfsc STATUS,Z to skip > over the crucial instruction movf PCLATH_TEMP,W which causes a lot of > program damage. Oh, I do that sort of thing a lot. My debugging sessions usually go something like this: 1. Comment out an instruction after a BTFSx, without commenting out the BTFSx itself. For bonus points, make a few more changes at the same time. 2. Wonder why the code stopped working 3. Scratch head a few times and scan through the code looking for obvious mistakes. Completely miss the BTFSx followed by a comment 4. Tear out some hair, read through the code again 5. Go off and have a cup of tea/coffee/Vitacoco depending on mood 6. Return and find the cursor sitting on the commented out instruction after the BTFSx 7. Comment out the BTFSx 8. Everything works again. 9. Break something else 10. Continue from step 2. Rinse, repeat as necessary. > THANKS very much, No thanks necessary :) -- Phil. | Kitsune: Acorn RiscPC SA202 64M+6G ViewFinder philpem@dsl.pipex.com | Cheetah: Athlon64 3200+ A8VDeluxeV2 512M+100G http://www.philpem.me.uk/ | Tiger: Toshiba SatPro4600 Celeron700 256M+40G -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist