hundt@OCCLUSAL.RUTGERS.EDU (Thomas M. Hundt) (02/23/90)
[Dunno if it's been covered here before... but:] PGA and VGA are both analog RGB formats. PGA scans at 60 Hz vertical, 30.5 kHz horizontal; VGA at about 70 and 32. In other words, they're pretty close --- the monitor can handle it. The problem is with the sync signals. PGA expects a lowgoing composite sync, and VGA puts out v- and h-sync separately, at three different combinations of polarity. It uses these to indicate what graphics mode it's in: scan h sync v sync lines polar polarity 350 __-__ --_-- 400 --_-- __-__ 480 __-__ --_-- So, you will want to rig up a circuit that will make each of these always the same polarity, and then mix them, and send the composite signal to the PGA monitor. The trick to sensing polarity is to integrate the signal --- a resistor followed by a cap to one of the power rails, to a CMOS gate (used as a comparator to 2.5 V). XOR this integrated signal with the incoming one, and you have a constant polarity signal. NAND the horizontal and vertical contant polarity signals and you get composite sync. (Note, you might have to invert a little here and there, I'm just giving the basic idea here.) Now, you know enough to build the thing, except for some small details: The IBM PGA monitor has no 5 V supply. You will need to put in a 7805 to generate this. (The sync signals are TTL levels; you will need something TTL to drive them; CMOS doesn't seem to cut it.) PGA monitors have a "compatibility mode" input. It switches them from 400 line mode to 480 line mode. (Really selects a different vertical size pot.) You don't *need* to use it; if you adjust the v-size when in 640 x 480 mode, the other modes will just look "smaller". If you're like me, however, you will want the largest image at all times on the screen, and hook this signal to the integrated vertical sync line (possibly inverted, depending on how you have it set up). I replaced the power LED with a tri-color one to indicate what the mode signal is doing. ---------- VGA pinout (blank = unused) 1 red video 2 green video 3 blue video 4 5 gnd 6 red gnd 7 green gnd 8 blue gnd 9 key (no pin) 10 sync gnd 11 12 13 h sync 14 v sync 15 Signal levels are black (0 V) to full (+0.7 V) PS/2 sync signals scan h freq h sync v freq v sync lines kHz polar Hz polarity 350 31.47 __-__ 70.08 --_-- 400 31.47 --_-- 70.08 __-__ 480 31.47 __-__ 70.08 --_-- ---------- PGA pinout 1 red 2 green 3 blue 4 sync (negative composite TTL) 5 mode (TTL high = 480 lines, low = 400 lines) 6 red gnd 7 green gnd 8 blue gnd 9 sync gnd Video signal levels are 0 to 0.6 V. Scan rate is 30.48 kHz horizontal, 60 Hz vertical. Resolution is 640 x 480 or 640 x 400. (830 x 480 max resolution) ---------- -Tom Hundt