Home » News » Content
Product Categories

The Interface Of Raspberry Pi SPI And I2C

- Jul 27, 2018 -

                        The interface of Raspberry Pi SPI and I2C

Raspberry Pi comes with SPI and I2C interface, so it can easily control the OLED display with SPI control chip. In order to successfully realize the communication between Raspberry Pi and oled, it is best to buy an oled with SSD1306 as the main control chip, because the driver library for this chip is the easiest to find, of course, if you have the ability to write your own driver. never mind


SPI is a shorthand for the Serial Peripheral Interface. It is actually a bus communication protocol. The bus works in master-slave mode. It is usually a master device and one or more slave devices. Generally, four wires are required. Data communication, ie SDI (data input), SDO (data output), SCLK (clock), CS (chip select), correspondingly, there is a set of timing logic to specify the communication process. 

Generally, the devices using SPI are equipped with off-the-shelf SPI modules, and only need to write instructions to the corresponding registers to communicate. If there is no SPI interface, it can also be implemented by software, which is to manually operate GPIO according to the timing diagram to realize communication. It is more difficult.

The Raspberry Pi has an SPI interface, but the default is off.