Worked like a charm, Grumpy_mike, thanks, that was exactly what I was looking for.
One note I experienced in using your Pin Change Interrupt call
PCattachInterrupt(7, rpm_fun01, CHANGE);
Versus the original hardware interrupt call
attachInterrupt(0, rpm_fun, RISING);
Is that it doubled my resulting rpm from the following equation
if (rpmcount >= 20) {
//Update RPM every 20 counts, increase this for better RPM resolution,
//decrease for faster update
rpm = 30*1000/(millis() - timeold)*rpmcount;
timeold = millis();
rpmcount = 0;
Serial.println(rpm,DEC);
}
Output from Hardware Interrupt was 1200 rpm
Output from Pin Change Interrupt was 2400 rpm
I know this is because the CHANGE state measures both the switch from high to low and the switch back from low to high as a trigger each where the RISING call only triggers on the low to high switch.
I thought Id just mention it if anyone else doesn't catch it reading this in the future because the first version only supports CHANGE and not RISING and FALLING.
Thanks again for your help, I was this close <-> to switching to a much more complex I2C answer.
Boz