Using analog comparator to read VRS frequencies.

Hi, I found this post about using the analog comparator for frequency counting:

http://www.gammon.com.au/forum/?id=11504

I wanted to verify that was digital pin input on 47 for Timer 5 on the mega 2560?

Is it possible to have more than one comparator input? I am trying to read tach and speed from my car (old mercedes diesel) both of which seem to be measured in frequency modulation (is that the right term?).

That's nothing to do with the analog comparator which uses pins AIN0 and AIN1 (port E bits 2 and 3, one of which is not brought out I believe in the Mega).

The analog comparator can be configured to trigger timer1 input capture, and can generate interrupts directly.

I think you, however, are talking about the T0, T1, T3, T4 and T5 digital inputs to timers 0,1,3,4,5? Only T0,T4 and T5 are brought out, as Arduino pins 38,42,47 (at least on the Mega1280 from what I can tell).

I have no clue what I am talking about :grin:

All I know is that I need a frequency counter to measure the increase and decrease in engine RPM. I would prefer to do this without another breakout board if possible. I have read that this is possible with the analog comparator and I though this is what the thread above is talking about. Seems like it isn't.

So, whats the easiest way to poll frequency changes?

Did you search the playground for a frequency counter first.. and if not, Why Not...?

http://www.gammon.com.au/forum/?id=11916

The comparator is used to notice if a voltage level is above or below a reference voltage. I don't think this applies in your case.

Hi, I found this post about using the analog comparator for frequency counting:

http://www.gammon.com.au/forum/?id=11504

The word "comparator" does not appear on that page.