It is my belief that anytime you are controlling machinery of any sort, you need to use interrupts. People can wait, machines can't. It sounds like you aren't using DT-INTs, on a timer which would make pauses unnecessary, and which would allow you to read the RPM (assuming you have access to a signal - like the crankshaft position sensor) simultaneously with everything else. Search the forum for my tachometer example. Since uses a timer to poll pins, you can use any pin at all for your tachometer.
If you have a belt pulley on the engine, you can use that as well. Years ago, I glued two magnets on a pully (using JB Weld - a good epoxy), and read an engine's RPM with
a Hall-effect sensor mounted on a bracket that was about 6mm away.
Bookmarks