Project

General

Profile

SPI demo

Target Demo file : esp32_spi_demo.slx

Host Demo file : spi_host_demo.slx

Description

This demo shows how to use the SPI Block and write and read data to an external SPI EEPROM module and send that data to the host PC via UART.

Hardware Setup

  1. ESP32 module
  2. aMG USB Converter-N
  3. 25AA512 512 Kbit SPI Bus Serial EEPROM
  4. Host PC with Matlab Simulink

The CS pin (GPIO25), SCLK pin (GPIO14), MISO pin (GPIO12) and MOSI pin (GPIO13) should be correctly connected to the 25AA512 512 Kbit SPI Bus Serial EEPROM module.
The TX (GPIO32) and RX (GPIO33) pins of the ESP32 should be connected to the aMG USB Converter-N and the USB converter should be connected to the host PC.

What should be happening?

After the hardware is set up and the host simulink model is run on the host PC the written data to the SPI should be shown as in the following figure.

Previous : UART two boards demo
Next : I2C demo

Also available in: PDF HTML TXT