Home
MDA / CGA / EGA


Pin Assignment

 
MDA
CGA
EGA
Comment
Pin 1
Ground
Ground
Ground
 
Pin 2
Ground
Ground
+ Secondary Red
 IBM EGA Card: When emulating MDA or CGA, a jumper (P1) grounds this pin
Pin 3
 
+ Red
+ Red
 IBM MDA Card: See note 1 below
Pin 4
 
+ Green
+ Green
 IBM MDA Card: See note 1 below
Pin 5
 
+ Blue
+ Blue
 IBM MDA Card: See note 1 below
Pin 6
+ Intensity
+ Intensity
+ Secondary Green
 IBM EGA Card: Becomes 'Intensity' when emulating MDA or CGA
Pin 7
+ Video
 
+ Secondary Blue
 IBM EGA Card: Becomes 'Video' when emulating MDA
Pin 8
+ Horizontal Sync.
(18.43 kHz)
+ Horizontal Sync.
(15.7 kHz)
+ Horizontal Sync.
(15.7 / 21.85 kHz)
 IBM EGA Card: See note 2 below
Pin 9
- Vertical Sync.
(50 Hz)
+ Vertical Sync.
(60 Hz)
+/- Vertical Sync.
(60 Hz)
 


Note 1:
Normally not connected, but in an early version of the IBM MDA that I have (dated 1982), pins 3/4/5 are connected to chip U64 and consequently are being driven low.
 
Diagram here
 
 
Note 2:
Mode 1 = 15.7 kHz,  Mode 2 = 21.85 kHz
The IBM EGA monitor (5154) automatically switches between modes 1 and 2 according to the polarity of the incoming vertical sync pulses.



Sync Pulses

As measured on the IBM cards.
Figures are approximate only.
Like the other types of signals, these are TTL level.


 
MDA
CGA
EGA
Horizontal
Sync
8 µs positive going pulse every 54.3 µs
4 µs positive going pulse every 63.7 µs

  Mode 1:   4.5 µs positive going pulse every 63.7 µs

  Mode 2:   5 µs positive going pulse every 45.8 µs

Vertical
Sync
850 µs negative going pulse every 20 ms
190 µs positive going pulse every 16.7 ms

  Mode 1:   190 µs positive going pulse every 16.7 ms

  Mode 2:   600 µs negative going pulse every 16.7 ms




EGA - Mode 1

First, 'Mode 1' and 'Mode 2' are terms that IBM uses in its documentation for the IBM EGA 5154 monitor. They should not be confused with what are known as 'video modes'.

You can think of Mode 1 as 'CGA mode'.

When the IBM EGA monitor (5154) is connected to an IBM EGA card, Mode 2 is the normal mode of operation, however, when software uses certain video modes, the EGA card will switch to Mode 1 operation, which in turn will result in the EGA monitor switching to Mode 1 operation.
You can see this for yourself:
 
1. Boot your computer into DOS.
 
2. Because Mode 2 operation is in effect, you'll find that the 'V.SIZE 2' adjustment on the 5154 monitor rear works, but that the 'V.SIZE 1' adjustment does not.
 
3. Run CheckIt software (either version 2.1 or 3).
 
4. Select TESTS then VIDEO then GRAPHICS. A test pattern will show, using video mode 04.
 
5. Because Mode 1 operation is now in effect, you'll find that the 'V.SIZE 1' adjustment on the 5154 monitor rear works, but that the 'V.SIZE 2' adjustment does not.

There is another situation which causes the IBM EGA monitor (5154) to switch to Mode 1 operation: If you connect an IBM EGA monitor to an IBM CGA card, the monitor will switch into Mode 1 operation (because of the positive vertical sync pulses), and behave just like a CGA monitor. All colours, including the intensified versions, are displayed correctly. I know, because I have tried that with my IBM hardware.