Measure sync pulses from an analog RGBHV signal possible?

Hi All,

Hopefully this is the correct area for my question(s)?

I'd like to know if it would be possible for an Arduino micro-controller to measure the sync pulses (horizontal and vertical) from an analog RGBHV signal. My understanding is that the sync pulses are TTL signals from 3 - 5 volts.

If this seems achievable with the Arduino, is someone able to point me in the right direction, e.g. similar sketches and shield set-up.

Thanks in advance

What do you want to measure about them? Pulse width (use pulseIn()) or frequency?

Hi John,

johnwasser:
What do you want to measure about them? Pulse width (use pulseIn()) or frequency?

I'm wanting to measure the frequency.

E.g. If horizontal sync frequency > 15,750Hz then do something

There are lots of messages about using the Arduino as a frequency counter. You can use Google or the forum search feature to find those answers.

A quick and dirty method would be to measure the pulse length with pulseIn(). If the length is less than 64 microseconds the frequency is higher than 15750.

A more precise method is to use the Input Capture feature of Timer1 to capture the timer count when the Input Capture input goes HIGH. This will let you measure the period in 16ths of a microsecond (1016 counts for 15750 kHz).