User Tools

Site Tools

Translations of this page?:

en:spi

SPI Bus in the MLAB Kit

SPI is, alongside I²C, another widely used interface. Its advantages include simple operation, high data transfer rates, and full-duplex bidirectional communication.

Interface Handling in Python

To use SPI from a Python program, there is an existing library. In Linux, it can be installed from the command line:

sudo apt-get install python-pip
sudo pip install spidev

Library documentation.

Options for Connecting Devices to SPI

Native SPI Interface

A significant portion of commercially available microcontrollers have an SPI interface as one of their peripherals.

Interfaces Created by Conversion

An SPI interface can also be created by converting from other standard buses.

From I²C

If the data transfer speed is not critical, the SPI interface can be created from the I²C bus using, for example, the I2CSPI01A module. This allows connecting multiple SPI slave devices.

From USB

When data transfer speed is important, it's preferable to use a bus with higher bandwidth, such as USB. To create an SPI interface, there are specific integrated circuits that mainly differ in software support:

Connecting these chips to the operating system is rather complicated. However, the best solution is probably using the MCP2210 on a new MLAB module.

en/spi.txt · Last modified: 2024/10/19 21:23 by kaklik