I2C and EDID/CI
Reading and Writing Monitor DDC Data
A work in progress, this documentation is a primer for understanding how to interface to a computer monitor's DDC port.
In a Nutshell
Using the I2C (3-wire) protocol, a computer can exchange DDC data with a monitor. The DDC port exists on the video cable and is linked into the host system's management bus.
I2C, inter-integrated circuit, is a synchronous serial interface that shares three wires with all other devices on a bus. The interface includes data (SDA), clock (SCL) and ground. One device is designated master and all other devices are termed slaves and operate under the timing of the master. I2C provides a protocol frame consisting of starts, data separated by ACKs or NAKs and stops. One of the most significant advantages of an I2C bus is that devices may be added without the need to provide a dedicated port for it.
DDC provides for a simple set of requests which can retrieve monitor configuration and capability, and change operating parameters. Actually, DDC requests to the monitor are reads from an I2C EEPROM device like the 24C02.
I2C Physical Interface
The DDC channel is on pins 12 (SDA) and 15 (SCL) of the monitor's HDB15 connector. These signals are attached to an EEPROM on the monitor's video interface. Additional electrical connections include ground on pin 5 and 5.0 VDC on pin 9 which powers the EEPROM when the monitor is not connected to mains power.
The host computer sends a query through the DDC channel in order to detect the presence of a monitor. Five distinct request may be sent. Most VGA monitors will respond to I2C address 0x50. Up to 256 bytes of data may be retrieved from the DDC port of the monitor that contains asset, capability and operating information. This information can also be written.
Below is a set of actual DDC query message that occurs at a one second rate.
Arduino Sketch - Read EDID
This Arduino sketch will read EDID and print in hex table.
Telos Systems, VESA DDC, http://www.telos.de/facts-vesa-ddc/ (new window)
Wikipedia, I2C, http://en.wikipedia.org/wiki/I%C2%B2C (new window)
SMBus.org, SMBus Specification, http://smbus.org/specs/smbus20.pdf (new window)