>In my case, the interrupt is from INT0 or INT1, depending >on the IR frequency. On each interrupt, I capture the 16 >bit value of TMR3, then reset the timer. I also reverse >the edge detect for the associated input so I can watch >it coming and going. Hmm, I am just trying to do this on a 16F630, and am going to be pushing the minimum width I can measure. However in the process I have come up with an ingenious scheme (even if I do say so myself) to detect both rising and falling edges without needing to change an edge setting. The comparator will detect both edges in a similar manner to the interrupt on port B change feature, but the clearing of the interrupt is independent of the port read. This does away with the missed interrupt possibility of the port b interrupt on change. The CMCON register has the current state of the output of the comparator as one bit, and the interrupt flag and enable as other bits. Reading port A does not clear this, you need to read CMCON to clear the interrupt. Luckily I need only one input like this. If you needed more, then you would need more comparators with separate CMCON registers for each one :) Now I just wish I had a PLL to up the internal 4MHz to 16MHz (or even 8MHz would do). Please Mr Microchip. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body