> I am currently looking at Interupts Paul, if you don't need to use an interrupt then I think it would be an unnecessary complication at this stage if you're unsure. My inclination would be to get it done without an interrupt so you've got (a) the satisfaction and relief of having got something working and (b) a fall-back point to build on if you want to tackle interrupts However, it would be quite straight-forward to do this with the INT0 interrupt You can also use T0CKI as a counter input (see the Option_Register and Timer0 sections in the datasheet). If you load TMR0 with "255 - count" (ie for you, 255 - 50), when 50 pulses have been entered into T0CKI then TMR0 will increment from 255 (or -1) to 0 and TMR0IF will be set. You can either poll for this or use it to generate an interrupt wbr PS in my /10 code posted the 'loop can be moved one line down as W hasn't changed movlw 0x0a loop subwf temp ;subtract 10 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist