I'm thinking you could connect a signal diode between each pin and RB0 so that a pulse to any pin would also trigger RBO interrupt.
Then in the interrupt service routine go and check which pin has the pulse on it... if it can be done fast enough.
I'm thinking you could connect a signal diode between each pin and RB0 so that a pulse to any pin would also trigger RBO interrupt.
Then in the interrupt service routine go and check which pin has the pulse on it... if it can be done fast enough.
Just got the tachometer working yesterday without any interrupt!
I decided to check the tach signal port in the main loop
just to roughly check the engine is not already running before engaging the starter motor.
I found that a single pulse is counted several times.
Adjusted the check to count only low to high transitions,
and voila! I have my pulse count!!
This would probably be too low res to measure time between pulses, and program adjustments would interfere
with timing so I count the number of pulses over a second for a display that is updated every second.
Not bad for free though![]()
Last edited by Art; - 20th February 2012 at 02:45.
Bookmarks