I have an RPM sensor that outputs a digital pulse for every rotation.
To calculate the RPMs, I must count the pulses it outputs. However, I cannot implement an interrupt routine (ISR).
How can I count pulses without an interrupt routine?
Thank you all for the help.
I cannot implement an ISR because the microprocessor is way too overcharged, which gives me noisy and not so accurate results. So I need some other solution.
The best alternative I've found so far was to count it by hardware (with the counters set to external interrupts)
The Arduino already has a demanding main loop, I am using all serial ports, I2C, etc. I am using almost all resources already. For this reason, a solution based on ISR does not give satisfatory results, as the Arduino may fail to count some interrupts.
If i use the timer overflow interrupt, OR SOMETHING SIMILAR (and this is my question), I don't need to call an ISR for every pulse and I might get better results.
manattta:
The Arduino already has a demanding main loop, I am using all serial ports, I2C, etc. I am using almost all resources already. For this reason, a solution based on ISR does not give satisfatory results, as the Arduino may fail to count some interrupts.
If i use the timer overflow interrupt, OR SOMETHING SIMILAR (and this is my question), I don't need to call an ISR for every pulse and I might get better results.
If (which I very much doubt) an [external ?] ISR might be unsatisfactory why do you think an ISR triggered by a timer would be any better?
The reason for my doubt (in common with @holmes4 and@PaulS) is that the whole point about interrupts is that they get priority.