User Tools

Site Tools

Translations of this page?:

en:spi

This is an old revision of the document!


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 https://archive.fosdem.org/2018/schedule/event/rapid_spi_over_usb/attachments/audio/2461/export/events/attachments/rapid_spi_over_usb/audio/2461/USB_SPI_FOSDEM_2018.pdf using the MCP2210 on a new MLAB module.

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