Gmail Lists wrote: > 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. Why not use the CCP hardware for accurate speed measurement and do the PWM output in software? Motors don't need very high PWM frequency due to mechanical inertia. > Processor = PIC16F870 @ 4MHz You can run it at 20MHz. Compared to a motor the power difference will be small. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist