I'm trying to control a PMDC motor using PIC16F870. It can regulate speed using PWM mode of the CCP module. The hall effect sensor outputs a train of pulses, frequency of these proportional to the motor speed. Since the CCP module is being used in PWM mode, I cannot use it in capture mode to time these pulses. To do so, the alternative that I can think of is to use RB0/INT. The rising/falling edges of the pulses from the sensor act as external triggers on RB0/INT pin. The interrupts so generated can be timed by TMR0 (which is running in the background). Kindly comment on this solution. Or are there other better ways of doing it? Hardware details: Processor = PIC16F870 @ 4MHz PORTA<1> reads a pot for speed setting. PORTA<5:2> are free pins. PORTB is free. PORTC<7:4> are connected to LCD data lines. PORTC<1:0> are to LCD control lines. PORTC<2> is PWM output. PORTC<3> is flashing LED. Peace, Mohit. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist