AN 486: SPI to I2C Using Altera MAX Series

ID 683611
Date 9/22/2014
Public

1. SPI to I2C Using Altera MAX Series

Altera® MAX® II, MAX V, and MAX 10 FPGA devices serve as a bridge between a host that has serial peripheral interface (SPI) to communicate with devices connected through an I2C bus.

The I2C is a serial, two-wire, low-bandwidth, industry standard protocol used in embedded systems to communicate with various low-speed peripheral devices. The SPI is a widely used, fast, four-wire, full duplex, serial communication interface.

Many embedded systems today have SPI interfaces, making it difficult to connect them with peripheral devices in an I2C fashion. You can make the connection by modifying the system, but this is economically inefficient. The best solution is to use Altera devices as a bridge to connect the two interfaces.

You can use the MAX II, MAX V, or MAX 10 FPGA devices to implement the bridge. Altera devices provide greater flexibility, consume less power, and can be economically integrated into the embedded system. The MAX II, MAX V, or MAX 10 FPGA device acts as an SPI slave to the host (SPI master) and acts as a master to the I2C bus.

The provided designs enable an SPI-equipped host to control data flow to other devices such as Analog-to-Digital (AD) converter, LED controller, audio processor to read temperature sensors, hardware monitors, and diagnostic sensors that are on an I2C interface.

Figure 1. Implementing an SPI to I2C Interface Using a MAX II CPLDThe figure below shows a block diagram of a design example that uses a MAX II device.

The bridge interfaces with the SPI host as an SPI slave using four wires, SS and SCLK signals for control, and MISO and MOSI signals for data. The side interfacing with the I2C bus has two wires, and SCLK and SDA signals.