Skip to content
binho.io (opens in a new tab)Contact Us

SPI, short for Serial Peripheral Interface, is a widely-used communication protocol in the realm of electronics. Binho Mission Control optimizes the user’s interaction with the SPI protocol, presenting an intuitive approach to its functionalities. When the SPI communication protocol is selected and activated, the Command Panel gets segmented into three distinct sections, each dedicated to a specific facet of the SPI communication: settings, chip selection, and transaction execution.

SPI command panel for Supernova and Pulsar

The Bus Voltage section allows the user to initialize and set the bus voltage. Additionally, in the case of Supernova and Pulsar, users can measure the bus voltage and choose to use an external power source. Using an external source is equivalent to measuring the voltage and setting it to match the external supply.

Operation Settings for Nova

The Settings segment allows users to adjust the following parameters:

ParameterNova valuesSupernova and Pulsar valuesComment
Clock Freq 0.8 to 12 MHz10 kHz to 50 MHzDiscrete values.
Bit OrderMSB, LSB.MSB, LSB.Most/Least Significant Bit first.
Bits / Transfer8, 16.-Bits per transfer.
Mode0, 1, 2, 3.0, 1, 2, 3.(CPOL, CPHA) ∈ {(0,0); (0,1); (1,0); (1,1)}

CPOL and CPHA refer to the clock’s polarity and phase. In tandem, they designate the precise timing and edge (be it rising or falling) at which data is sampled.

Chip Select for Nova

ParameterAdmited valuesComment
Pin SelectCS0, CS1.CS = Chip Select
PolarityLow, High.Active Low/High polarity for CS.
Pre-DelayNumericOnly positive integer numbers. Unit: μs.
Post-DelayNumericOnly positive integer numbers. Unit: μs.

Pre/Post Delays pertain to the time gap between the inactive-to-active transition of the CS (Chip Select) signal and the sampling of the initial payload bit.

Transactions sub-panel.

This segment comprises two text fields and a dedicated TRANSFER button, simplifying SPI transaction processes.

  1. Write Buffer: Enter the data payload for the target device in hexadecimal, grouped in byte packets. For instance, inputs like ‘00’ or ‘FF’ (contingent on the chosen polarity) symbolize a read-only operation.
  2. Read Size: This field allows users to determine the quantity of bytes they wish to retrieve from the target device. Initiating an SPI transaction is as simple as hitting the TRANSFER button.

Outlined below are hands-on tests with tangible devices, offering a glimpse into the SPI protocol in action.

Flash memory test with a Winbond W25Q128FV: the datasheet defines an instruction that returns the JEDEC manufacturer ID, memory type and capacity together. Send the byte ‘0x9F’ to the flash to run it. Winbond’s manufacturer ID is ‘0xEF’. The part accepts clocks up to 50 MHz and SPI modes 0 and 2, and this test ran at 12 MHz in mode 0. The JEDEC ID returned was the expected one.

Write operation to a SPI flash memory

Pressure Sensor Test with BMP280: This example delves deeper, showcasing the capabilities of the SPI protocol using the BMP280 pressure sensor.