I2C LPT Interface Schematic
Click on picture to enlarge
|Electronic diagram||PCB Board||Component layout|
The electronic diagram consist of conventional part. From the LPT port the data lines D0 and D1 are used as the SCL and SDA output lines. The Ack line is used to read the data from the SDA line. If you want to use the computer as an I2C device, than the Error line is used to receive the I2C clock pulse form the I2C master device. To protect the LPT port lines, all lines are protected by an inverter port with open collector output, the 74LS06N is used here. All signals are written and read inverted by the LPT port. The 10K resistors are used to pull up the open collector output. To be able to detect the interface by the software, an extra inverter is used between the lines SLCT-In and SELECT.
Building the I2C interface is very easy when you use the PCB layout. All components, including the connectors, are mounted on the PCB board. As power supply you can connect a 5Vdc transformer with a cable connector of 5.5mm outside and 2.1mm inside. Make sure that the inside part of the cable connector is the plus pole!
To use the I2C interface you have to connect via the mini din connector a I2C device. Several test applications can be downloaded from this website to test the interface with the most common I2C devices like the PCF8574 I/O expander, PCF8595 A/D converter and the SAA1064 4 digit display driver.
For creating your own applications you can use the InpOut32DLL.zip to communicate with the LPT port. When you develop under Visual Basic, a dedicated I2C_InpOut32_VBbas.zip module is available. This module contains all the necessary I2C protocol commands. See the download section.