0
\$\begingroup\$

in input of a CPLD, I have a syncronization video signal that can be like this (positive polarity): Positive Polarity

or like this (negative polarity):

enter image description here

I want to recognize the type of the sync signal and invert the signal only if it has positive polarity. How can I do this with digital logic and without using analog filter?

Thank you

\$\endgroup\$

4 Answers 4

1
\$\begingroup\$

Count the high duration AND the low duration (in one period), then compare the results.

\$\endgroup\$
1
\$\begingroup\$

If your signals in the FPGA are nice and clean like you show in the question then this is a relatively easy thing to do. Setup a pair of counters that are enough bits to cover the ability count the high time and the low time periods of the signal at some reasonable resolution. Resolution being the clock rate that the counters operate at. Then compare the two values and after several comparisons giving the same result you can set a inverted/non-inverted sync flip flop. The flip flop can control a MUX through which you select the actual sync signal versus an copy of the sync signal fed through an inverter.

\$\endgroup\$
0
0
\$\begingroup\$

How can I do this with digital logic and without using analog filter?

Count/measure the high period. You will have a clock somewhere presumably and you need to count pulses while the sync signal is high.

Since you want active-low sync, a high count means correct polarity. A low count means incorrect.

\$\endgroup\$
-2
\$\begingroup\$

I once was involved in making equipment for local cable studios, and polarity detection was pain, because of presence of the video data, differences in amplitude, DC blockage etc.; the only reliable method was detecting polarity of vertical blanking interval, which has characteristic pattern with no video data at all.

\$\endgroup\$
1
  • \$\begingroup\$ We're not talking about composite video here. The sync signals are digital inputs to a CPLD. \$\endgroup\$
    – Dave Tweed
    Commented Jun 1, 2015 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.