I think your program will work ok but not as you wanted. TMR0 will increment with each transition of RA4 but the interupt will only be serviced after TMR0 overflows. So you would have to toggle RA4 256 times. If RA4 is configured as an input with no pull up/down resistor connected, then it may float between logic levels. As RA4 is a shcmitt trigger input, it will then increment TMR0's counter turning off the LED at random time intervals. Use RB0 as your trigger detect. Tony Just when I thought I knew it all, I learned that I didn't.