Hi Claudio. I think if you are not using PORTB for anything else but for encoder _reading_ only it should work. What is maximum PWM frequency those signals have? Alternatively you can scan them(PORTB7..4 lines) periodically by TMR0 or similar interrupt. From my past experience it is not stable to use PORTB interrupt on change feature so I'm trying to stay away from it. (too many restrictions) WBR Dmitry. Claudio Tagliola wrote: > Hello all, > I know this issue has passed the revue a dozen times already, however, I > can't find any usefull things from the archives. > I have two motion sensors which put out two PWM signals each. I want to > measure the length of those four PWM signals (this is the action > anglular data of the sensors). Now, with the PIC16F874 I use, I have two > options: use a capture register or use interrupt on change. Problem with > the capture is, I only have two. From the IOC ports RB7:RB4, there are > four. However, I remember a lot of words of caution when using the IOC > feature. If I have those four digital input signals only on those ports, > can I use this safely? And what were the all-too-familiar problems with > Interrupt on Change again? > Best Regards, > Claudio -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu