Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
VVV said:All you need to do is count the number of pulses from the sensor, that you get in a fixed amount of time, say 100msec. Multiplied by 600 that will be the motor's rpm.
One way to do this is to connect the sensor output to a counter input on the PIC. Then, you read the counter at the begining of the timing period and then 100msec later. Subtract the two readings and you get the number of pulses in 100msec.
Badaruddin said:You are right, you need an interrupt, that is time interrupt. This interrupt is generated 100 ms after counting the pulses input.