Hi!
I'am currently studying mechatronical engineering and am currently working on a steering project for a ventilation system.
Our system has a motor that is connected to a disk with holes around its perimeter. We want to read the RPM of the disk with an optical sensor which is sending out pulses to our micro controller.
We are completely novice with programming a pic controller and has reached a problem we need help with.
TMR0 function is used to count the pulses, so far has we gotten.
Now we want either to measure the time between the pulses or count how many pulses there is within a predetermined timespan in order to calculate the RPM.
Our ideas is something like the arduinos "millis()" function to get the time at the different timepoints.
Hopefully I explained it so you understand!
We would really appreciate some help!
I'am currently studying mechatronical engineering and am currently working on a steering project for a ventilation system.
Our system has a motor that is connected to a disk with holes around its perimeter. We want to read the RPM of the disk with an optical sensor which is sending out pulses to our micro controller.
We are completely novice with programming a pic controller and has reached a problem we need help with.
TMR0 function is used to count the pulses, so far has we gotten.
Now we want either to measure the time between the pulses or count how many pulses there is within a predetermined timespan in order to calculate the RPM.
Our ideas is something like the arduinos "millis()" function to get the time at the different timepoints.
Hopefully I explained it so you understand!
We would really appreciate some help!