Galaksija: Composite video generation

27.08.2006 18:05

As promised, here is the first part of a detailed description of how Galaksija generates a video signal. This description is based on my modified circuit, so some details may differ from the original, but the basic principles are the same. I will try to point out the key differences later in the text.

This first part is about the lowest level of the video generation circuitry, the so-called composite video generator. The schematic diagram of this part of the Galaksija circuit is shown below.

Before I go into details I would like to point you to some on-line resources about composite video because I will assume you already know what a video signal looks like. The Wikipedia article gives a nice introduction into this subject. You can find a more detailed description, including the description of sync pulses, in an article about analog video. Note that the composite video signal format is the same as the analog video format that is broadcasted over radio and cable TV systems (without RF modulation).

Now let's take a look at the circuit. On the left two signals (2, 4) enter the circuit. They come from the clock generator circuit and are square waves with basic vertical (2) and horizontal (4) synchronization frequencies. Each of these two signals triggers its own monostable multivibrator (one half of the 74HC123 circuit). The monostable multivibrator will give a voltage pulse of a fixed length on its output when the trigger signal goes from logical 0 to logical 1 (positive transition). The 74HC123 circuit used here also gives an inverted pulse on a complementary output. The length of the pulse is set with the RC circuit (R19/C11 for horizontal sync and R16/C12 for vertical - the formula can be found in the 74HC123 datasheet).

So now we have a train of impulses on the outputs of both monostable multivibrators. There are 16000 horizontal impulses per second, each 0.8µs long (7) and 50 vertical impulses per second, each 1.2ms long. If you read the composite video specifications carefully, you should notice that the horizontal impulses are shorter than they should be (PAL standard says they should be 5µs long). The author of the original Galaksija says that that this gives a more stable picture. I haven't checked whether this is true or not, but it should be easy enough to fix if it turns out not to be (just change the values of R and/or C). The vertical sync signal duration is equal to roughly 20 line durations, which is close to 21 lines in the standard.

The sync pulses and their complements are then routed to an XOR gate (composed of 3 NAND gates in the 74HC00 chip). The result is an inverted synchronization signal that is obviously close enough to the PAL standard so that it works with TV receivers. Note that there are no equalizing pulses in the vertical sync interval since Galaksija doesn't use interlaced video.

The sync signal must now be mixed with the video signal (1) that comes from the character generator. Both signals have TTL logic levels (0V for logical 0 and 5V for logical 1) which also need to be adjusted to the standard 0V - 1V voltage levels for composite video. The mixing is done with transistors Q4 and Q5. When there is a logical 1 on the sync line (8), this transistor pulls the output to the ground, which is equal to the sync level of 0V. When there is no sync pulse present, Q4 controls the output. Depending on the state of the video line it can either pull the line down to approximately 1.6V which is 5x reference black level of 0.3V or leave it at 5V which 5x reference white level of 1.0V. These levels are then further divided by approximately 2.3 by the voltage divider R24 / R27. At the output of the divider we now have the video signal at adjusted voltage levels mixed with the 0V sync impulses.

The final stage is an output amplifier Q6 / Q8 which reduces the high output impedance of the voltage divider to 75 ohms as specified in the composite video specification. You may notice that the output voltage levels are still approximately two times what they should be (peak at 2V instead of 1V). This is corrected when you connect a TV receiver to the video output which has 75 ohms of input impedance. This input impedance forms a divide-by-2 voltage divider with the output impedance of the output amplifier.

Note: vertical sync pulse is not to scale on the diagram above.

Some notes on the original Galaksija design: the original uses a RF modulator so it doesn't need the output amplifier. Also the voltage levels of the composite video are adjusted to those needed by the modulator and not to those needed by the composite video input of the modern TV set. The original also lacks transistors because it uses the open-collector outputs provided by chips in the 74LS series.

That's it for today. Next time I'll describe the character generator that generates the video signal (1) that contains the information needed to draw a picture on the screen.

Posted by Tomaž | Categories: Digital

Add a new comment


(No HTML tags allowed. Separate paragraphs with a blank line.)