ChArLyZzZ
New Member
hey guys
I'm using PIC16F877a...i'm connecting a DC motor on pin RC2/CCP1 (PWM) and getting the speed back from an optical interrupter on pin RC1/CCP2 (capture mode)...I'm using a 4 MHz crystal
I'm letting CCP2 generating an interrupt every 16th rising edge, then i display the values of CCPR1L and CCPR1H on LCD
I want to know how can i calculate this value to be the RPM of the motor??
I know how to calculate the period of the signal,but what next??
Thank you guys for ur help
I'm using PIC16F877a...i'm connecting a DC motor on pin RC2/CCP1 (PWM) and getting the speed back from an optical interrupter on pin RC1/CCP2 (capture mode)...I'm using a 4 MHz crystal
I'm letting CCP2 generating an interrupt every 16th rising edge, then i display the values of CCPR1L and CCPR1H on LCD
I want to know how can i calculate this value to be the RPM of the motor??
I know how to calculate the period of the signal,but what next??
Thank you guys for ur help