I2C PC-interface

A simple interface for accessing I2C devices from ActiveX/COM clients

The schematic below shows a simple I2C (IIC) to RS-232 interface that I made a few years back. It enables interfacing of I2C devices to a serial port on a PC. Connector J1 can in this case be replaced with a 9 pin female DSUB (DTR=pin 4, DSR=pin 6, RTS=pin 7, CTS=pin 8, GND=pin 5).

Connector J2 has the I2C SDA (data) and SCL (clock) lines. +5V must be supplied from an external power supply to the VDD line (it has not been tested with 3.3V).


I have written a COM component that enables communication with IIC slave devices from any COM-compatible development environment (for example Delphi, Visual Basic, LabView or a macro in Microsoft Excel). The component can work as a I2C bus master only.

The COM component (comi2c.dll) can be downloaded by clicking here. This DLL must be registered with the command: regsvr32 comi2c.dll

An example, in Visual Basic 6, of its use for retrieving temperature measurements from two DS1625 devices is available here.

The low level interface is written in C (see the "driver" directory in the source code tree). These C routines can be used if the COM interface is not desired.

The interface has proved useful for hardware and software prototype testing, and is provided here in the assumption that it also may be useful for others - but without any warranty!

The source code tree can be browsed here. A zip file with all files is here.

Created ~2002 by Asgaut Eng asgaut@pvv.org