As you know im very new to using pic's and im very stuck on this. I'm trying to monitor the speed of a couple of computer fans and then output the rotation speed (rpm) to an LCD display. I've tested this out on a usb interface board I have using vb.net to code it and it appears that the fan gives a single pulse per revolution and i've used some simple maths to work it out
so count pulses for 1 second * 60 = RPM of fan
The problem i've got is im now clueless as to how to achieve that with a pic :) i'm assuiming i'd have to use a timer of 1 second interval and for the duration that timer is running keep adding 1 to a integer variable until the timer elapses then maths on that value and reset var to 0.
The other problem i can see with this is doing 2 or more fans at the same time, as this will need to use separate timers for each?
Any guidance in the right direction would be greatly appreciated
Thanks
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys
As you know im very new to using pic's and im very stuck on this. I'm trying to monitor the speed of a couple of computer fans and then output the rotation speed (rpm) to an LCD display. I've tested this out on a usb interface board I have using vb.net to code it and it appears that the fan gives a single pulse per revolution and i've used some simple maths to work it out
so count pulses for 1 second * 60 = RPM of fan
The problem i've got is im now clueless as to how to achieve that with a pic :) i'm assuiming i'd have to use a timer of 1 second interval and for the duration that timer is running keep adding 1 to a integer variable until the timer elapses then maths on that value and reset var to 0.
The other problem i can see with this is doing 2 or more fans at the same time, as this will need to use separate timers for each?
Any guidance in the right direction would be greatly appreciated
Thanks
Tom