> thanks a lot for this. i will go over this in the next few days. this > is very helpful. It *should* work. When I have a little time tomorrow I'll run it through MPLAB and an F84 just to make sure. If it doesn't work as expected I'll let you know xorlw b'00000010' ;toggle b0 (LED flash) Comment should be b1. I wrote the code first with the LED on b0 but then thought you might want to add a capture, and that would best on b0 As for the timer, you could make it exactly 1s if that's important. If you remember, 1,000,000 / 256 = 3906.25 By setting TMR0, initially and at the reload, to that extra 0.25 * 256 ( = - d64) and adding 1 to the IRQs to be counted, -> d3907 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist