This article is from the comp.sys.ibm.pc.hardware.video Frequently Asked Questions, by Michael Scott with numerous contributions by others. (v1.0).
Standard 15 pin D-Sub VGA connector pinout
___________________________________________________ \ / \ 1 2 3 4 5 / \ / \ 6 7 8 9 10 / \ / \ 11 12 13 14 15 / \_____________________________________/
Pin # Description1 Red Video 2 Green Video 3 Blue Video 4 Sense 2 (Monitor ID bit 2) 5 Self Test (TTL Ground) 6 Red Ground 7 Green Ground 8 Blue Ground 9 Key - reserved, no pin 10 Logic Ground (Sync Ground) 11 Sense 0 (Monitor ID bit 0) 12 Sense 1 (Monitor ID bit 1) 13 Horizontal Sync 14 Vertical Sync 15 Sense 3 - often not used
Compaq (and perhaps some other companies) use the "Sense" lines as a way of telling what kind of monitor is connected. Newer monitors with DDC (also called Plug-n-play) use some of these pins.
[From: Ashok Cates (acates@clark.net)]
The ID bit pins in the 15 pin connector are shorted/left open to identify the type of monitor. I don't think they are very important anymore, as most cards have software to set resolutions, refresh rates etc. However, I think their functions are:
ID bit 0 and ID bit 2 grounded: Dual frequency analog color interlaced (8514 or compatible) or variable frequency analog color interlaced.
ID bit 0 grounded, ID bit 2 not connected: Fixed frequency analog color (8512, 8513, or compatible) or variable frequency analog color non-interlaced.
ID bit 0 not connected, ID bit 2 grounded: Fixed frequency analog monochrome (8503 or compatible) or variable frequency analog monochrome.
-ID bit 1 and ID bit 2 are usually connected together. -Monitor model numbers are for IBM monitors.
Standard 9 pin D-Sub PGA/EGA/CGA connector pinout [From: Michael Scott (scott@bme.ri.ccf.org)]
_______________________ \ / \ 1 2 3 4 5 / \ / \ 6 7 8 9 / \_____________/IBM Adapters Pin Assignment CGA EGA PGA VGA TTL 16 colours TTL 16/64 col. Analogue Analogue
1 GND GND Red GND 2 GND Secondary Red Green GND 3 Red Primary Red Blue Red 4 Green Primary Green Composite Sync Green 5 Blue Primary Blue Mode Control Blue 6 Intensity Secondary Green Red GND GND /Intensity 7 not used Secondary Blue Green GND not used 8 H. Sync H. Sync Blue GND H. Sync /Comp. Sync 9 V. Sync V. Sync GND V. Sync
 
Continue to: