Synchronise your video engines

The importance of applying the correct video sync signal to your TV, monitor, scan converter, HDMI adaptor or projector.
This post tries to answer some of the many questions I get relating to the GBS-8200 and non-standard video types. I will
provide information on how to help identify the correct synchronisation or sync signal for shortness, for common applications
and describe some of the effects you may see when you get it wrong. I do not have a guaranteed fix for any problem, this is more
a how to guide to help you fix any issues you may encounter.

Topics covered in this post

What are synchronisation(sync) signal(s)?
Understanding your composite from your H/V and Sync On green type?
Basic information on video sync timings, PAL, NTSC, CGA, EGA, VGA.
Converting video sync amplitude
Sync strippers/cleaners/separators
Best options for the GBS-8200

What are synchronisation(sync) signal(s)?

Let’s start with a basic description of a sync signal. I took the following from the Tektronix Video Measurements glossary:

Sync – a) Abbreviation for synchronization. Usually refers to the synchro-
nization pulses necessary to coordinate the operation of several intercon-
nected video components. When the components are properly synchro-
nized, they are said to be “in sync”. b) Signals which control the sweep of
the electron beam across the face of the display. The horizontal sync, or
HSYNC for short, tells the display where to put the picture in the left-to-
right dimension, while the vertical sync (VSYNC) tells the display where
to put the picture from top-to-bottom. c) The portion of an encoded video
signal which occurs during blanking and is used to synchronize the opera-
tion of cameras, monitors, and other equipment. Horizontal sync occurs
within the blanking period in each horizontal scanning line, and vertical
sync occurs within the vertical blanking period.

With the move to LCD displays we are not concerned with movement of an electron beam but it is useful to understand how
the horizontal and vertical sync signals play their part in creating the display you see.

Basic information on video sync timings, PAL, NTSC, CGA, EGA, VGA.

 

Video type Horizontal
frequency
Vertical
frequency
Interlaced? Number
of lines
Notes
 PAL  50 Hz  15.625 KHz  Yes  576 active  (1)
 NTSC  59.94 Hz  15.750 KHz  Yes  480 active  (1)
 CGA  60 Hz  15.750 KHz  Yes  200  TTL signals. (2)
 EGA  60 Hz  15.750 KHz/21.80 KHz  No  350?  Vertical frequency changes depending on the mode,
200 line display is 15.750KHz, 350 line display is 21.80 KHz. TTL signals
 VGA  60 Hz  31.469 KHz  No  480+  Lowest resolution shown, extends up to 2014×1536

(1) Quite often when a system states PAL or NTSC output, e.g. a camera, the signal is a composite video signal. For higher quality
conversions, either a Y/C(S-video) or an RGB output is preferred. The sync is embedded with the video.
(2) CGA is unique in that it uses TTL digital signals, with an intensity pin to get 16 colours. If you don’t have an adaptor board to convert
the RGB+intensity to analogue, most converters will struggle. Has separate H/V syncs

You will note that I state that NTSC has a vertical frequency of 59.94 Hz, where as most of the other standards are 60Hz, indeed some
literature states 60 Hz for NTSC. In practice, most of the time this 0.06Hz deviation makes no difference.

Understanding your composite from your H/V and Sync On green type?

So you have a retro game console or computer and you want to connect it to a modern LCD  display or a projector, should be straightforward right?

Depending on the equipment you may have a single signal or multiple types. The table below details the main types:

Sync type Voltage Description
Composite video 1V Normally a yellow plug, contains video and a combined sync. Used by SCART inputs.
CSYNC TTL (2-5V signal) Output by some graphics cards or a TTL signal from retro equipment. It only contains timing information, no video.
HSYNC TTL (2-5V) signal Provides the horizontal video timing, which details the start and end of a line.
VSYNC TTL (2-5V) signal Provides the vertical sync timing, which describes the frame rate.
Sync-on-green 1V A -0.3V sync signal attached to a 0.7V peak green video signal.

An important point is that you need to know what signal amplitude is expected by your TV/monitor/scaler/converter. A common mistake, is to connect
a CSYNC signal, either from a retro device or a computer, to a SCART socket. The SCART standard expects composite video on pin 20, if you feed in a
TTL CSYNC signal, you could be supplying a signal upto 5x higher than expected. My Amiga SCART  and Atari SCART cables fixed multiple video issues,
with a simple fix to the sync amplitude, by adding a series resistor on the sync signal.

I show a TTL signal as a 2-5V signal, for good reason. A retro computer or video system will have 5V logic, a logic 1 output can be from 2.4V (min) to 5.5V(max).
When you connect one of these signals to a 3.3V video chip, like that on the GBS-8200, you are damaging the device as the input signal exceeds the supply voltage.
The ESD protection diodes conduct and soft of allow the system to work, but they are not meant to be used continuously and will fail, at the same time as your board.
The next section details various methods of converting sync signals.

Converting video sync amplitude

So how do you convert a composite video to separate h/v sync or reduce a 5V TTL signal to 3.3V LVTTL or any or a number of options?

Some conversions are simple and can use readily available modules, others need a little circuit board. The table below will help:

From To Solution
Composite  CSYNC (3.3V or 5V)  Sync stripper
 Composite  H & V Sync (3.3V or 5V)  Sync stripper2
 CSYNC  Composite (1V) level  Resistor circuit
 H & V Sync  CSYNC (3.3V or 5V)  OR/XOR gate
 Sync on green  CSYNC (3.3V or 5V)  Sync stripper2
 Sync on green  H & V Sync ((3.3V or 5V)  Sync stripper2
 5V TTL  3.3V TTL  Level converter

Examples of each circuit element are shown in the sections below. What is not shown are power supplies and connectors. This is left to the developer,
though for all circuits shown, a simple linear regulator would suffice.

Sync strippers/cleaners/separators

When I first started researching video adaptors and converters I came across ‘sync strippers’ and wondered what they were. They are relatively simple
circuits, based around commonly available  sync separators, the most widely used being the National Semiconductor (now Texas Instruments) LM1881.
They accept a composite video signal and strip the colour burst off the signal and in the case of the LM1881, output a 5V TTL CSYNC signal.

Syncstripper circuit

LM1881-circuit

Taken from the LM1881 datasheet. Widely used as it’s a readily available part in a DIP package.
There are two limitations of this part:
1) The 5V TTL output is not compatible with modern TVs/HDMI adapters/projectors. It needs a level translator.
2) It does not provide a separate horizontal sync output. If your adaptor only needs CSYNC, great, otherwise try the Syncstripper2 circuit below.
You may get away with using CSYNC for HSYNC but it is by no means guaranteed.

Syncstripper2 circuit

LMH1980-circuit

Again taken from the datasheet. Being a surface mount device will put some people off, the VSSOP-10 package is a bit small but you can
easily buy a SSOP to DIP adaptor off ebay. If you power it from a 3.3V supply, the logic level outputs will be compatible with modern
display devices, no external converter needed. It provides true H/V and C sync outputs and works with a wider range of video types and frequencies.

Would an adaptor board with this circuit, video amplifier and maybe a scanline generator be of interest?

Potential divider and logic level converters

Resistive potential divider circuits
The first circuit converts 5V TTL signals to 1V CSYNC for SCART

5VTTL-SCART

This is a simple potential divider circuit. The output voltage is 75/(75+330) x Vin which gives an output voltage that is ~18% of the
input or around 0.92V.

The second variant is for the GBS-8200 or a modern monitor that is not 5V tolerant.

5VTTL-LVTTL_resistors

With a VESA VGA video monitor or equivalent, the input impedance of the display is much higher, in this instance, 2K. As the aim is to
reduce the signal to be approximately 3.3V, we reduce the amplitude by 27-30%.

One disadvantage of this circuit is that the RC time delay does affect the rising/falling edge of the sync pulse slightly. In most circumstances,
this will not matter but some systems may have issues if the time delay extends past a 100ns rise/fall time. For a cleaner, faster signal, use
logic devices.

Transistor logic level convertor

An improvement is to use a transistor circuit.
FET_level_Translator

This circuit is simple to implement and provides faster edges than resistor networks. You will also find this on ebay as a
level translator for the Arduino, it is acceptable to use it for video.
LevelConverter-L

 

OR/XOR sync combiner circuit
HV_Sync_Csync

The circuit shown above has the option to use either an OR gate or an XOR gate to combine separate HSYNC and VSYNC into a CSYNC signal.
Most of the time, the OR gate will suffice. Depending on the display you interface, you may need to invert the vertical syn portion,
hence the option to use an XOR gate. The 33R resistors were added to damp any ringing when driving long cables. With careful selection of the logic
family, you can use a 5V tolerant part, operating from a 3.3V supply.

Effect of supplying a 5V signal to a 3.3V device

This could be very detailed and lengthy discussion detail the effects of electromigration and it’s detrimental impact on device reliability. I’ll summarise,
DON’T CONNECT 5V LOGIC TO MODERN MONITORS OR ADAPTORS!
Whilst it will appear to work, you may see odd effects, occasional display artefacts or issues displaying a stable image occasionally. If a device is powered
from 3.3V and you feed in 5V, you are exceeding the power supply by upto 1.7V, not a good start. The internal ESD protection diodes, will clamp the signal
to around 3.9/4.0V, which you might think is OK. The clamping action distorts the signal and can cause the video display/adaptor to incorrectly sample the sync signal.
The ESD diodes are only meant to  have short term use to protect from static electricity, which is normally a short, sharp shock. If they are continuously used, they
will fail and when they do, the full 5V signal is fed into the IC. Depending on many factors, the distortion will get worse but one thing is 100% certain, the device will fail.

Best options for the GBS-8200

I would recommend as a minimum that any sync signals are scaled using at least a potential divider circuit or a transistor level shifter as they are readily
available, providing your source produces a C sync signal. If you need to to combine H and V Sync, use the logic circuit shown above.
If your system provides a composite video signal, use one of the sync strippers but ensure you condition the output to be 3.3V LVTTL compatible.

Summary

I hope this guide has been useful and informative. It is only meant to provide guidance on common issue I have encountered when inter-connecting various video
systems it is not a definitive guide of what you must do. Sometimes you need to experiment, if you have an oscilloscope, make some measurements.

I’ll be taking a break for a bit whilst I get busy with the CAD tools but I will read and respond to your comments.

Advertisements

7 thoughts on “Synchronise your video engines

  1. Since the GBS is very sensitive, I’d like to use the transistor level converter (5v to 3.3v) but, to do this, you need 2 VCC
    While the 5V could be find on the PSU, what is the best place to get 3.3V ?

  2. Hi. I’m trying to connect an atari STf to a pvm monitor. This model has no composit video, and while it’s still supposed to have sync on pin 2, it does not seem to work. I tried both a normal scart cable (that works with other ataris) as well as another identical cable and adding a 330 resistor to the sync cable, and nothing.
    I know the hsync and vsync signals are ok because the atari works fine with an atari sm124 monitor.

    If I want to get csync from hsync and vsync for this computer, can I use the circuit above? What real world components do I need and how do I power them?
    Thanks!

    1. Hi,

      For a Sony PVM monitor, we could use the “OR/XOR sync combiner circuit” shown above. As the CRT Sony PVMS accept 5V TTL logic, we could use a standard TTL logic device, no need for level translation, which makes it easier.

      To realise the circuit you would need a 74LS32, 74LS86, 2-3 100nF ceramic decoupling capacitors, a toggle or slide switch, some veroboard/protoboard and some 33R resistors and some 1K resistors.

      You only need one of the 4 gates in each logic device, connect the un-used inputs via 1K resistors to +5V to stop them ringing and causing havoc later. Connect the 100nF capacitors across pins 7 and 14 of the 74LS32 and 74LS86 device. Oh and a 13 pin DIN plug.

      From what I remember of the Atari, the +12V supply is current limited with a resistor. Is there another way of tapping off +5V from the Atari?

      The ugly way to do it would be to have a plug-in mains adaptor to power the circuit. You can buy them with +5V outputs, e.g. a mains USB adaptor/charger or a plugtop +5V adaptor like this:
      https://www.rapidonline.com/stontronics-t5094st-5v-1a-switch-mode-power-supply-adaptor-90-2648

      1. Hi Ian,
        Thanks for your reply. Actually, just yesterday thorugh the atari forum someone had a great idea to check why All cables I tried did not work. To open up the Atari and check. It seems some units of the STF (mine among them) did not even have the CSYNC generating circuit components fitted!! The drawing/place for them is there, but not installed! I was told the components, and it should be a matter of just soldering the 2 diodes, 3 resistors and transistor in their place and I should then get the sync signal on pin 2 as “normal”! Do you still recommend I add the 300 resistor to the cable as per you revised diagram? I assume if I make a cable meant for a pvm , which will only use the R,G,B, comp/sync & audio cables (and the ground ones), that I don’t need/care about the other pins and extra components like othe resistors, diode and capacitor, for the other signals that a regukar scart for TV uses, right?

  3. Do I need a syncstripper in a component setup?

    I’m testing the gbs8220 with component for now, and with NTSC (ps2, Wii) it looks fine, with PAL (ps2) the image shows a little “trembling”.

  4. I tested an amiga modded gbs8200 that was running 5v into the sync for a few days before I read this blog and added a 680 ohm resistor. It has some jagged noise on the right side of the picture and ghosting around movement(especially noticeable near the cursor) but other wise is working ok. How would I know if it has been damaged?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s