SPI

Send data between microcontrollers and small peripherals

Quick Explanation

  • Supports full duplex mode
  • Supports communication with multiple slave devices

Protocol

  • De facto standard for short distance communication

Serial Peripheral Interface Bus

VisualSim Serial Peripheral Interface Bus (SPI) 3.0 bus library provides the first system-level modelling environment for assembling the port-to-port simulation of networking equipment. The SPI interface contains the data and MAC layers of the protocol, constructed at the signal level with accurate timing and data transfer. The blocks of this library can be connected with other networking and hardware architecture components to form the full system. Standard reports generated include a timing diagram showing the saw-tooth behaviours, number of I/O, and effective data rate. The library can also be used to develop extensions to the protocol for definition of future generation architectures.

Parameters Used

Some of the parameters and blocks used in this library are as follows:

  • Data_Rate: This parameter is used to specify the rate at which data is being sent
  • SPI_Traffic_Gen: This block is used to generate the required traffic

Features

VisualSim Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select (chip select) lines.VisualSim SPI bus can operate with a single master device and with one or more slave devices. During each SPI clock cycle, a full duplex data transmission occurs:

Some of the parameters and blocks used in this library are as follows:

  • 8-bit exchange between two devices
  • One byte at a time transfer
  • Clock does not need to be precise
  • 16 bit shift register
  • 8 bit baud clock generator
  • DMA support
  • The master sends a bit on the MOSI line; the slave reads it from that same line
  • The slave sends a bit on the MISO line; the master reads it from that same line

In General

Serial Peripheral Interface (SPI) is an interface bus commonly used to send data between microcontrollers and small peripherals such as shift registers, sensors, and SD cards. It uses separate clock and data lines, along with a select line to choose the device you wish to talk to.SPI is a “synchronous” data bus, which means that it uses separate lines for data and a “clock” that keeps both sides in perfect sync. The clock is an oscillating signal that tells the receiver exactly when to sample the bits on the data line. This could be the rising (low to high) or falling (high to low) edge of the clock signal; the datasheet will specify which one to use. When the receiver detects that edge, it will immediately look at the data line to read the next bit. Because the clock is sent along with the data, specifying the speed isn’t important, although devices will have a top speed at which they can operate.

SPI- Implements SPI Bus Interface model