I2C, or Inter-Integrated Circuit, is a popular serial interface protocol that is widely used in many electronic systems. The I2C interface is a two-wire interface capable of half-duplex serial communication at moderate to high speeds of up to a few megabits per second. The I2C system incorporates an addressing system to identify the multiple I2C ‘slaves’ on the I2C bus. An I2C system can have single or multiple masters. The two bidirectional lines of the I2C system are SDA (Serial Data) and SCL (Serial Clock). An important electrical feature of the I2C lines are that they are both made up of open drain ports and are pulled high by resistors.
This reference design illustrates the implementation of an I2C slave using an iCE40™ ultra low density FPGA. The I2C slave implements functions as a port expander via an I2C bus.