Silicon ChipColour TV Pattern Generator; Pt.2 - July 1997 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Backing up is not hard to do
  4. Feature: Electric Vehicles; Where Are They Now? by Sammy Isreb
  5. Review: Philips 48-Inch Rear Projection TV by Leo Simpson
  6. Project: Infrared Remote Volume Control by Leo Simpson
  7. Back Issues
  8. Order Form
  9. Project: A Flexible Interface Card For PCs by Rick Walters
  10. Project: Points Controller For Model Railways by Rick Walters
  11. Serviceman's Log: The neighbour who made things worse by The TV Serviceman
  12. Project: Simple Waveform Generator by John Clarke
  13. Book Store
  14. Project: Colour TV Pattern Generator; Pt.2 by John Clarke
  15. Feature: Computer Bits by Jason Cole
  16. Feature: How Holden's Electronic Control Unit Works; Pt.1 by Julian Edgar
  17. Product Showcase
  18. Feature: Radio Control by Bob Young
  19. Vintage Radio: Revamping an old Radiola by John Hill
  20. Notes & Errata: Multimedia Amplifier, October 1996
  21. Market Centre
  22. Advertising Index
  23. Outer Back Cover

This is only a preview of the July 1997 issue of Silicon Chip.

You can view 30 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "A Flexible Interface Card For PCs":
  • BASIC source code for the Flexible Interface Card for PCs (Software, Free)
  • Flexible Interface Card for PCs PCB pattern (PDF download) [07107971] (Free)
Items relevant to "Points Controller For Model Railways":
  • Points Controller PCB pattern (PDF download) [09205971] (Free)
Items relevant to "Simple Waveform Generator":
  • Simple Waveform Generator PCB pattern (PDF download) [01307971] (Free)
Items relevant to "Colour TV Pattern Generator; Pt.2":
  • Colour TV Pattern Generator DOS software (Free)
  • Colour TV Pattern Generator PCB patterns (PDF download) [02305971/2] (Free)
Articles in this series:
  • Colour TV Pattern Generator; Pt.1 (June 1997)
  • Colour TV Pattern Generator; Pt.1 (June 1997)
  • Colour TV Pattern Generator; Pt.2 (July 1997)
  • Colour TV Pattern Generator; Pt.2 (July 1997)
Articles in this series:
  • Computer Bits (July 1989)
  • Computer Bits (July 1989)
  • Computer Bits (August 1989)
  • Computer Bits (August 1989)
  • Computer Bits (September 1989)
  • Computer Bits (September 1989)
  • Computer Bits (October 1989)
  • Computer Bits (October 1989)
  • Computer Bits (November 1989)
  • Computer Bits (November 1989)
  • Computer Bits (January 1990)
  • Computer Bits (January 1990)
  • Computer Bits (April 1990)
  • Computer Bits (April 1990)
  • Computer Bits (October 1990)
  • Computer Bits (October 1990)
  • Computer Bits (November 1990)
  • Computer Bits (November 1990)
  • Computer Bits (December 1990)
  • Computer Bits (December 1990)
  • Computer Bits (January 1991)
  • Computer Bits (January 1991)
  • Computer Bits (February 1991)
  • Computer Bits (February 1991)
  • Computer Bits (March 1991)
  • Computer Bits (March 1991)
  • Computer Bits (April 1991)
  • Computer Bits (April 1991)
  • Computer Bits (May 1991)
  • Computer Bits (May 1991)
  • Computer Bits (June 1991)
  • Computer Bits (June 1991)
  • Computer Bits (July 1991)
  • Computer Bits (July 1991)
  • Computer Bits (August 1991)
  • Computer Bits (August 1991)
  • Computer Bits (September 1991)
  • Computer Bits (September 1991)
  • Computer Bits (October 1991)
  • Computer Bits (October 1991)
  • Computer Bits (November 1991)
  • Computer Bits (November 1991)
  • Computer Bits (December 1991)
  • Computer Bits (December 1991)
  • Computer Bits (January 1992)
  • Computer Bits (January 1992)
  • Computer Bits (February 1992)
  • Computer Bits (February 1992)
  • Computer Bits (March 1992)
  • Computer Bits (March 1992)
  • Computer Bits (May 1992)
  • Computer Bits (May 1992)
  • Computer Bits (June 1992)
  • Computer Bits (June 1992)
  • Computer Bits (July 1992)
  • Computer Bits (July 1992)
  • Computer Bits (September 1992)
  • Computer Bits (September 1992)
  • Computer Bits (October 1992)
  • Computer Bits (October 1992)
  • Computer Bits (November 1992)
  • Computer Bits (November 1992)
  • Computer Bits (December 1992)
  • Computer Bits (December 1992)
  • Computer Bits (February 1993)
  • Computer Bits (February 1993)
  • Computer Bits (April 1993)
  • Computer Bits (April 1993)
  • Computer Bits (May 1993)
  • Computer Bits (May 1993)
  • Computer Bits (June 1993)
  • Computer Bits (June 1993)
  • Computer Bits (October 1993)
  • Computer Bits (October 1993)
  • Computer Bits (March 1994)
  • Computer Bits (March 1994)
  • Computer Bits (May 1994)
  • Computer Bits (May 1994)
  • Computer Bits (June 1994)
  • Computer Bits (June 1994)
  • Computer Bits (July 1994)
  • Computer Bits (July 1994)
  • Computer Bits (October 1994)
  • Computer Bits (October 1994)
  • Computer Bits (November 1994)
  • Computer Bits (November 1994)
  • Computer Bits (December 1994)
  • Computer Bits (December 1994)
  • Computer Bits (January 1995)
  • Computer Bits (January 1995)
  • Computer Bits (February 1995)
  • Computer Bits (February 1995)
  • Computer Bits (March 1995)
  • Computer Bits (March 1995)
  • Computer Bits (April 1995)
  • Computer Bits (April 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • Computer Bits (July 1995)
  • Computer Bits (July 1995)
  • Computer Bits (September 1995)
  • Computer Bits (September 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits (December 1995)
  • Computer Bits (December 1995)
  • Computer Bits (January 1996)
  • Computer Bits (January 1996)
  • Computer Bits (February 1996)
  • Computer Bits (February 1996)
  • Computer Bits (March 1996)
  • Computer Bits (March 1996)
  • Computer Bits (May 1996)
  • Computer Bits (May 1996)
  • Computer Bits (June 1996)
  • Computer Bits (June 1996)
  • Computer Bits (July 1996)
  • Computer Bits (July 1996)
  • Computer Bits (August 1996)
  • Computer Bits (August 1996)
  • Computer Bits (January 1997)
  • Computer Bits (January 1997)
  • Computer Bits (April 1997)
  • Computer Bits (April 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Computer Bits (July 1997)
  • Computer Bits (July 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits (September 1997)
  • Computer Bits (September 1997)
  • Computer Bits (October 1997)
  • Computer Bits (October 1997)
  • Computer Bits (November 1997)
  • Computer Bits (November 1997)
  • Computer Bits (April 1998)
  • Computer Bits (April 1998)
  • Computer Bits (June 1998)
  • Computer Bits (June 1998)
  • Computer Bits (July 1998)
  • Computer Bits (July 1998)
  • Computer Bits (November 1998)
  • Computer Bits (November 1998)
  • Computer Bits (December 1998)
  • Computer Bits (December 1998)
  • Control Your World Using Linux (July 2011)
  • Control Your World Using Linux (July 2011)
Articles in this series:
  • How Holden's Electronic Control Unit Works; Pt.1 (July 1997)
  • How Holden's Electronic Control Unit Works; Pt.1 (July 1997)
  • How Holden's Electronic Control Unit Works; Pt.2 (August 1997)
  • How Holden's Electronic Control Unit Works; Pt.2 (August 1997)
Articles in this series:
  • Radio Control (November 1996)
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)

Purchase a printed copy of this issue for $10.00.

Colour TV pattern generator; Pt.2 While the Colour Television Pattern Generator is rather complex in its operation, the circuitry is straightforward. This is because all the patterns are stored in the ROM. This month, we present the circuit and give the construction and testing de­tails. By JOHN CLARKE 54  Silicon Chip connection. With LK1a in position (run mode), counter IC2 is clocked by a 3.2768MHz oscillator based on IC6a, with IC6b serving as a buffer stage. Note that pin 13 of IC6a is tied high while its pin 12 input is connected to its pin 11 output via a 4.7MΩ resistor. This biases the gate in the linear mode so that it operates as an inverting amp­ lifier. The 33pF capacitors to ground on either side of crystal X1 provide the correct loading. Fig.9 (right): the complete circuit diagram of the pattern generator. All the patterns are stored in the EPROM (IC1) and this is programmed via the parallel port of a PC.  The circuit for the Colour Television Pattern Generator is shown in Fig.9 and comprises 11 ICs in total. Central to the circuit is IC1 which is the 64K EPROM or OTP memory (note: this device was incorrectly referred to in Pt.1 as an EEPROM). This IC has its address lines connected to counters IC2, IC3, IC4 & IC5. Counter IC2 is driven by a clock signal from either IC6b or IC6c, depending on the link (LK1a or LK1b) LK1b is substituted for the program mode, in which case IC2 is clocked via inverter stage IC6c from the D2 line on Port C of the computer. The 100kΩ pullup resistor connected to IC6c’s inputs prevents them from floating when Port C is disconnected, while the associated 680pF capacitor provides transient suppres­sion. This prevents false clocking which could otherwise occur whenever there are level changes in the data lines on Port A. IC2 is an up/down pressettable synchronous 4-bit counter with a carry out (CO) output at pin 12. This output is fed to the clock input of the following counter (IC3), which is connect­­ed in cascade with IC2. IC4 & July 1997  55 PARTS LIST 1 PC board, code 02305971, 173 x 142mm 1 plastic instrument case, 200 x 155 x 65mm, with aluminium front panel 1 front panel label, 195 x 63mm 1 rear panel label, 31 x 25mm 1 video modulator, Astec UM1285AUS 0/1 (DSE Cat K-6043 or equiv­alent) 1 12VAC 500mA plugpack 1 DC power socket 3 SPDT toggle switches (S1,S3,S4) 1 2-pole 6-way rotary switch (S2) 1 3.2768MHz parallel resonant crystal (X1) 1 4.433619MHz parallel resonant crystal (X2) 2 panel-mount RCA sockets 1 25-pin D socket, PC board mounting (not right angle) 1 mini TO-220 heatsink, 19 x 19 x 9mm 1 4-way pin header 1 20-way pin header 5 jumper shunts 1 28-pin DIL IC socket 1 8mm ID solder lug 17 PC stakes 1 15mm diameter knob with position indicator 3 3mm x 6mm long screws plus nuts 2 3mm x 12mm long screws plus nuts 2 6mm untapped standoffs 4 self-tapping screws to mount PC board 1 200mm length twin shielded wire 1 350mm length black hookup wire 1 200mm length blue hookup wire 1 50mm length yellow hookup wire 1 50mm length green hookup wire 1 60mm length of 4-way rainbow cable 1 650mm length of 0.71mm tinned copper wire IC5 are also cascaded to provide a total of 16 address lines for IC1. The clear (CLR) input of each counter is normally tied low via a 100kΩ resistor. When these inputs go high, the counter outputs are reset low. LK5b 56  Silicon Chip Semiconductors 1 programmed NM27C512N120 OTP or 27C512-10, 27C512-12 EPROM (IC1) – see text 4 74HC193 4-bit presettable up/down counters (IC2-IC5) 1 74HC00 quad dual input NAND gate (IC6) 1 555 timer (IC7) 1 4053 3-pole 2-way analog switch (IC8) 1 74HC04 hex inverter (IC9) 1 AD722 RGB to NTSC/PAL encoder (IC10) 1 74HC27 triple 3-input NOR gate (IC11) 4 1N4004 1A rectifier diodes (D1-D4) 1 1N914 signal diode (D5) 1 3mm green or red LED (LED1) Capacitors 1 1000µF 25VW PC electrolytic 2 470µF 16VW PC electrolytic 8 10µF 16VW PC electrolytic 8 0.1µF MKT polyester 2 0.01µF MKT polyseter 2 680pF MKT polyester or ceramic 1 100pF ceramic (see text) 2 33pF ceramic 1 4-40 3-pin trimmer capacitor (VC1) Resistors (0.25W, 1%) 1 4.7MΩ 1 1kΩ 1 330kΩ 1 680Ω 8 100kΩ 3 330Ω 3 10kΩ 1 180Ω 1 2.2kΩ 1 120Ω 3 2kΩ 1 75Ω Software 1 Software disc (optional) – available for $10 (incl. p&p) from Silicon Chip Publications Miscellaneous Medium-duty hookup wire, rainbow cable, 25-pin D-plug lead (optional for programming), solder. is installed for programming mode, which means that the CLR inputs of IC2-IC5 are all momen­ tarily pulled high via a 10µF capacitor when power is applied. This resets the counters so that all output lines are low. Conversely, in the run (pattern producing) mode, LK5a is installed and the counters are now reset via IC11c’s output. The D4, D5 & D7 data lines of IC1, corresponding to the blue, green and composite sync outputs, are NORed in IC11a. All these lines go low after the 312th line of data has been produced and IC11a’s output goes high. This is inverted by IC11b and so the .01µF capacitor on IC11c’s inputs quickly discharges via D1. IC11c’s output thus goes high and resets the counters. This reset signal stays high while the .01µF capacitor at IC11c’s input charges via the 2.2kΩ resistor. This ensures that all the counters reset correctly. The delay circuit is necessary because data lines D4, D5 & D7 are no longer all low once the memory has returned to the start of line 1. Programming pulse IC1’s E-bar input at pin 20 determines whether the device is in program or read mode. When link LK2a is in position, pin 20 is tied low and the data lines becomes outputs. This is for the run mode. Conversely, when LK2b is in position, a programming pulse circuit consisting of 555 timer IC7 and inverter IC6d is connect­ed to the E-bar input of IC1. This circuit is in turn controlled by the -D1 line of computer Port C. Initially, pin 2 of IC7 is held high via a 10kΩ resistor which connects to the +5V supply rail. However, when -D1 of Port C goes low, it pulls pin 2 of IC7 low via a .01µF series ca­pacitor. This triggers IC7 so that pin 3 goes high for the time set by the 330kΩ resistor and 0.1µF capacitor tied to pins 6 & 7. Pin 6 is the threshold input and this switches the pin 3 output low again once its voltage reaches 66% of the supply voltage. This is nominally after 33ms. IC6d inverts the signal to provide the correct programming pulse level to the E-bar input of IC1. Note that the E-bar input of IC1 is monitored via the D4 input of computer Port B. This allows the software to detect when the programming pulse has finished. The Vcc input to IC1 at pin 28 needs to be 5V when the unit is operated in run mode and 6V when operated in program mode. Links LK3a and LK3b provide this by selecting either the output from REG1 or the output from The 25-pin D socket is mounted on the PC board and is connected to the parallel port of the computer to program the EPROM. Once programming has been completed, the unit operates independently of the computer. REG2 respectively. Simi­larly, the G/ Vpp input at pin 22 requires 12.5V for programming but 0V when outputting the data. This is achieved using links LK4a and LK4b. LK4b selects the 12.5V output from regulator REG3, while LK4b connects the G/Vpp pin to ground. The circuit is powered from a 12VAC plugpack via switch S1. Diodes D1-D4 rectify this and the resulting DC is filtered using a 1000µF capacitor. REG1, REG2 and REG3 regulate the voltage down to 5V, 6V and 12.5V respectively. REG1 and REG2 are standard 3-terminal regula­ tors which provide 5V and 6V rails, respectively. The 10µF capacitors at their outputs are there to prevent instability and provide improved transient response. LED1 is connected across the 5V supply via a 680Ω resistor to give power-on indication. REG3 is an adjustable regulator which produces a nominal 1.25V between its adjust and output terminals. The 120Ω resistor across these terminals sets up a current of around 10mA which flows through the 1kΩ resistor and 200Ω variable resistor VR1. VR1 is adjusted to set the output voltage to 12.5V. Rotary switch S2a selects between the checkerboard, dot, crosshatch/circle and raster patterns available at the D0-D3 outputs of IC1. The selection is applied to the ax input (pin 12) of IC8, a 4053 CMOS analog switch. Input ax is the red signal for the selected pattern, while the bx and cx inputs (pins 2 & 5) are for the green and blue signals. The latter are normally connected to the ax input via switch S2b, except for position 2 when the red raster is select­ed. In that case, the green and blue inputs are tied high via a common 100kΩ resistor. IC8 basically behaves as a 3-pole 2-position switch. The a, b & c outputs at pins 14, 15 & 4 respectively are the three poles. The ax, bx and cx connections are switched through when the A, B and C control lines at pins 11, 10 & 9 are low and this occurs when switch S3 is in position 1. Depending on the position of S2, this provides the signals for either the white raster, the red raster, crosshatch/circle, dot or checkerboard pattern. Conversely, when S3 is open, the A, B and C inputs are pulled high via a 100kΩ resistor and the alternative ay, by & cy inputs (pins 13, 1 & 3) are switched through instead. This pro­ vides the colour bar pattern from the D6, D5 & D4 data lines of IC1. RGB-to-PAL encoding The a, b and c outputs of IC8 are July 1997  57 Table 1: Resistor Colour Codes  No.   1   1   8   3   1   3   1   1   3   1   1   1 Value 4.7MΩ 330kΩ 100kΩ 10kΩ 2.2kΩ 2kΩ 1kΩ 680Ω 330Ω 180Ω 120Ω 75Ω buffered using inverters IC9a-IC9f which are connected as three parallel pairs. This is necessary to allow the signals to be fed to the following atten­ uator stages, each of which only has a nominal 2.33kΩ impedance. These attenuators reduce the 5V signal outputs from IC9 to 700mV, as required to produce a full white signal from the following RGB-to-video encoder stage based on IC10. As shown in Fig.9, the signals from the attenuators are applied to the RGB inputs (pins 6, 7 & 8) of IC10. In addition, the composite sync signal from D7 of IC1 is applied to IC10’s pin 16 input. The 4.43MHz crystal on pin 3 provides the colour burst frequency, while the internal phase lock loop multiplies the crystal frequency by four to produce the timing signals for the PAL encoder. Trimmer capacitor VC1 allows the colour burst frequency to be set to 4.43619MHz. IC10 produces composite video, luminance and chrominance signals at pins 10, 11 and 9 respectively. Switch S4 selects the composite video signal for colour patterns and the luminance output for black and white or grey­ scale. The only difference between the composite video and the luminance signal is that the latter does not include the chrominance (or colour) information. The luminance and chrominance outputs can be used to pro­vide S-video signals if required. To add this facility, you would have to install a 75Ω resistor and 470µF capacitor in series with the luminance output and a 75Ω 58  Silicon Chip 4-Band Code (1%) yellow violet green brown orange orange yellow brown brown black yellow brown brown black orange brown red red red brown red black red brown brown black red brown blue grey brown brown orange orange brown brown brown grey brown brown brown red brown brown violet green black brown resistor and 0.1µF capacitor in series with the chrominance output. The video signal on S4’s wiper is fed to the video output socket via a 470µF capacitor and 75Ω resistor. It is also fed to a video modulator via VR2 and a 470µF capacitor. VR2 sets the signal level into the modulator, while the associated 10kΩ resis­tor biases the modulator input to its correct black level. The modulator also has an audio input and this is fed via a 10µF capacitor. The maximum level that can be applied here is 5V p-p. Power for the modulator is derived from the +12.5V supply from REG3 and is fed via a 180Ω resistor to limit the current through an internal zener diode. The RF output from the modulator is on either channel 0 or 1, as set by link LK6. Construction Despite the complicated way in which it works, this unit is really easy to build. Virtually all the parts are mounted on a single PC board coded 02305971 (173 x 142mm) and this is housed in a standard plastic instrument case with an aluminium front Table 2: Capacitor Codes  Value IEC Code EIA Code  0.1µF  100n   104  0.01µF   10n   103  680pF  680p   681  33pF   33p    33 5-Band Code (1%) yellow violet black yellow brown orange orange black orange brown brown black black orange brown brown black black red brown red red black brown brown red black black brown brown brown black black brown brown blue grey black black brown orange orange black black brown brown grey black black brown brown red black black brown violet green black gold brown panel. Adhesive dress labels were fitted to the front and rear panels of the prototype to provide a professional finish. Begin the construction by carefully checking the PC board for shorts between tracks and breaks in the copper pattern. Usually, there will be no problems here but it’s best to check before installing any of the parts. In some cases, it may be necessary to enlarge the mounting holes for the 25-pin D-socket and for the regulator tabs (these holes should all be 3mm). You should also check the hole sizes for the modulator earth mounting lugs, as well as the four corner mounting holes for the PC board. Fig.10 shows the wiring diagram. Begin the board assembly by installing the links and the resistors. Table 1 shows the resistor colour codes but you should also check each value on a digital multimeter, as the colour bands can sometimes be diffi­cult to read. The diodes can then be installed, taking care to ensure that they are correctly oriented. Note that two different diode types are used on the PC board, so be sure to use the correct type at each location. The 1A 1N4004s have a black body, while the smaller 1N914s are usual­ly orange in colour. Seventeen PC stakes are specified in the parts list and these are installed on the PC board at the external wiring points. The exceptions here are points 1-4 adjacent to IC1, where a 4-way pin header is installed to terminate four of the leads from switch S2. Note: The patterns produced by the TV Pattern Generator are slightly off-centre due to a slight displacement in the line sync signal. In most cases, the normal over-scanning of each line on the TV screen will mask out this small shift. It can be corrected by adding an RC network to delay the line sync by the requisite 1.5µs. This involves adding a 4.7kΩ resistor between the D7 output of IC1 at pin 11 and the sync input of IC10 at pin 16. The pin 16 input of IC10 is bypassed to ground with a 270pF capacitor. The resistor is best placed instead of the link on the PC board above the three 330Ω resistors near IC10. The capacitor can connect from pin 16 to pin 1 of IC10 on the underside of the PC board. Fig.10: take care to ensure that all parts are correctly orientated when assembling the PC board. Next, install the ICs in the locations indicated, taking care to ensure that the notched end of each device agrees with the wiring diagram. Use a socket for IC1 and leave this IC out until the testing stage described later on. IC10 is a surface mount device and is installed on the underside of the PC board as shown in one of the photos. To do this, first pre-tin the copper pad areas where the IC pins will be located, then solder the IC in place using a fine-tipped soldering iron. When you have finished, inspect your work care­fully to ensure that there are no July 1997  59 4 terminal. The 25-pin D-socket is mounted on 5mm spacers and secured using 3mm screws and nuts. It’s 25-pin connections are then soldered to the copper pads of the board. Link pairs LK1a/LK1b through to LK5a/LK5b are based on 2-pin headers. A jumper shunt is fitted to each pair and, in each case, is normally placed in the “a” position for run mode. Alter­natively, the links are all moved to the “b” positions for the programming mode. Either a single-in-line 20-way pin header or a dual-in-line 10-way pin header will be supplied for the link pins. In either case, you simply cut the header into 10 2-way pin headers using side cutters. Final assembly Once the EPROM has been programmed, move the LK1-5 jumpers to the rear (ie, to the “a” position) of their pin header pairs. Programming is unnecessary if you purchase a pre-programmed EPROM. solder bridges between adjacent pins of the device. The three regulators are mounted with their leads bent at right angles, so that their metal tabs sit flat against the PC board. The metal tabs are then secured to the board using 3mm screws and nuts. Note that REG1 (7805) is fitted with a small U-shaped heatsink but no heatsink is required for the other two regulators. Take great care when mounting the regulators. They are all different, so don’t get them mixed up. REG1 is a 7805 5V regula­ tor, REG2 is a 7806 6V regulator and REG3 is an LM317 adjustable regulator. The capacitors can be installed next, making sure that the electrolytic types are correctly orientated. Table 2 shows the codes used on the MKT polyester and ceramic types. This done, install the two trimpots, trimmer capaci­tor VC1, crystals X1 (3.2768MHz) and X2 (4.43MHz), and LED1. The latter should be mounted at full lead length, so that it can later be bent over and pushed into its mounting bezel on the front panel. It’s easy to identify the LED leads 60  Silicon Chip –the anode lead will be the longer of the two. The video modulator is mounted by soldering its earth tags to the PC board and inserting its four leads into the holes provid­ed. By default, link LK6 is open circuit and the modulator is set to channel 1. If you want channel 0 instead, bridge the two copper pads that sit adjacent to the modulator’s pin The AD722 RGB-to-PAL encoder (IC10) is a surface mount device and is installed on the underside of the PC board as shown here. Before installing the board in the case, it will be neces­sary to drill a number of holes in the front and rear panels. The first step is to fit the adhesive label to the aluminium front panel. This label can then be used as a template for drilling out the holes for the three toggle switches, the rotary switch and the bezel for the power indicator LED. You also have to drill holes in the rear panel for the RCA sockets, the DC power socket and the RF OUT socket. The various switches and sockets can then all be mounted in position. Note that switch S4 is fitted with a solder lug, to allow the front panel to be earthed. Before mounting the rotary switch, lift up the locking tab located under the mounting nut and move it to position 5 (rotate the switch fully anticlockwise first). This ensures that the switch only has the required five positions. Next, use an oversize drill to remove all the integral standoffs in the base of the case, except for those in the four corners. This done, fit the PC board and the rear panel to the base and secure the board to the corner standoffs using self-tapping screws. All that remains now is to complete the wiring. Use medium-duty hookup wire for the DC socket, switches S1 and S3, and for terminals 5 & 6 on S2. The connections to terminals 1-4 of S2 are run using rainbow cable, while the connection to the bottom terminal of S4 is run using hookup wire. The remaining connec­tions to S4 and to Fig.11: check your board for defects by comparing it with this full-size etching pattern, before installing any of the parts. the RCA sockets must be run using screened cable. Finally, complete the construction by pushing the power indicator LED into its bezel and attaching the knob to the rotary switch. Testing Before applying power, check to ensure that IC1 has not yet been installed and that the jumpers are in the LK1a, LK2a, LK3a, LK4a and LK5a positions (ie, run mode). This done, you can proceed with the following tests: (1) Connect the plugpack, apply power and check for 5V between pins 7 & 14 of IC6, IC9 & IC11. Similarly, there should be 5V between pins 8 & 16 of IC2-IC5 & IC8 and between pins 14 & 28 of the socket for IC1. (2) Monitor the output of REG3 and adjust VR1 for a reading of 12.5V. This done, check for 6V at the output of REG2 and for 0V at pins 20 & 22 of IC1. (3) If you have a preprogrammed ROM for IC1, switch off the power and plug it into its socket. You can now jump to the section headed “Trying it out”. (4) If your ROM is not preprogrammed, switch off and move the jumpers to LK1b, LK2b, LK3b, LK4b & LK5b. Now reapply power and check that pin 28 of IC1 is at 6V. Pin 20 should be at 5V and pin 22 should be at 12.5V. If you have access to an oscilloscope, you can check the pulse into pin 20 of IC1 when the -D1 Port C input is pulled low. You can do this by momentarily connecting a jumper lead between the -D1 line and ground. The resulting pulse at pin 20 of IC1 should be low for about 33ms. If all is correct, insert IC1 into its socket and proceed with the programming (not necessary if you have a pre-programmed ROM). Programming The ROM is programmed using either Quick Basic files or executable files. The procedure for programming the ROM using the executable files is as follows: (1) Check that the jumpers are in the LK1b, LK2b, LK3b, LK4b & LK5b positions. (2) Connect a 25-pin D-plug to 25-pin D-plug lead between the on-board socket and LPT1 of a PC. (3) Apply power to the pattern generator. (4) Insert the program floppy disc into drive A: (or B:), go to the A: prompt, type TVINSTAL and press Enter. This will automati­cally decompress and install the files contained within TVPATT.EXE into a directory called July 1997  61 COLOUR + (POWER 12VAC 500mA) (RF OUT CH1 OR 0) VIDEO OUT + POWER + ++ RED WHITE + GREY SCALE COLOUR TELEVISION PATTERN GENERATOR AUDIO IN Fig.12: these are the fullsize artworks for the front and rear panel labels. Basic on the C drive. To start the programming, simply type TVPGRM at the C:\Basic prompt. This automatically runs all the rele62  Silicon Chip vant .exe files to pro­gram the ROM. Note that the program first prompts you to apply power to the unit after ensuring that all the links are in the program position – see Fig.13. Once programming has started, the screen indicates the number of bytes programmed and which programs are to still to run – see Fig.14. The entire programming process will take about 45 minutes. Alternatively, if you want to program the ROM using the Basic files instead (eg, if you want to customise a pattern or you are not using parallel port LPT1 or the default address for this port), then follow this procedure: (1) Carry out steps 1 & 2 listed immediately above. (2) Copy the Basic software supplied on the floppy disc to a separate directory on your hard disc drive called “Basic”. There are seven files stored in this directory: TVPATT1.BAS – TVPATT7. BAS. All these files are necessary because a QBASIC program is limited in size to 64Kb. The first six programs are each about 56Kb, while the sev­enth is only about 16Kb. The first six programs are large mainly because of the 312- line DATA statements which each have 210 separate DATA items. Each program needs to run before the ROM is fully programmed but this happens automatically after TVPATT1.BAS is run. Note that the programs run in QUICK BASIC, so you will need to have this installed on your computer. The address of the port used is 378(HEX) to 37A(HEX). If you want to use a different port, then the address in each program will have to be altered to suit. The address used is the standard LPT1 port found in virtually all PCs. (3) Start by opening TVPATT1.BAS in QUICK BASIC and then running it by clicking on the RUN command. The screen shown in Fig.13 appears. (4) Wait a few seconds after switch on to give time for the power-on reset to take place, then press Enter on the keyboard to start the programming. When TV­PATT1.BAS has finished, the next program (TVPATT2.BAS) will automatically run and so on in sequence until programming is complete. As before, the entire process takes about 45 minutes. Note that each location in memory takes at least 33ms to program because of the programming pulse length and that repre­ sents a total of 36 minutes programming time Fig.13: this is the opening screen when you run the programming soft­-ware. It prompts you to check that links LK1-LK5 are each in the program (“b”) position. Fig.14: during programming, the software indicates the number of bytes that have been programmed and tells you which programs are to yet to run. alone (since there are 65,536 locations to program). Trying it out To test the unit, move the jumpers to LK1a, LK2a, LK3a, LK4a & LK5a. This done, connect the video output from the unit to the video input of a VCR and tune a TV set to the video channel. Alternatively, if the TV has a direct video input, you can connect the pattern generator to this instead. Apply power and check that all the patterns can be selected via the front panel switches. If the TV does not show colour for the colour bar selection, adjust VC1 until colour appears. Note that, with some EPROMs, the display may rapidly switch between colour and b&w. This can be cured by connecting a 100pF ceramic capacitor between pins 11 & 14 of IC1 (on the underside of the PC board). Finally, connect the RF output from the pattern generator to the antenna input of the TV set and tune the set to the appro­priate channel (0 or 1). Adjust VR2 for best colour bar reception. If the signal level from VR2 is too low, the colours will not be saturated. Conversely, if the signal level is too high, SC there will be no colour at all.