Mindmap
Lecture 11 - Serial Peripheral Interface (1)
Inhalt der Mindmap
Lecture 11 - Serial Peripheral Interface (1)
SPI Port Structure
- Has 3 Wires:
- SDI - Serial Data In
- SDO - Serial Data Out
- SCK - Shift Clock (O/P in Master Mode)
- Has 3 Wires:
A Simple Serial Link
- SPI port operates as Master or Slave
- When operating in Master Mode
- Generates SCK and sends it out to Slaves
- When operating in Slave Mode
- The devices uses the external clock generated by the Master
- When operating in Master Mode
- SPI is a Bi-Directional Synchronous Serial Interface
- SPI port operates as Master or Slave
SPI Interconnections for Multiple Slaves
- Only one active Slave at any time
- Determined by which Slave Select line is activated by the Master
- Sometimes Chip Select used for the same role
- Determined by which Slave Select line is activated by the Master
- Only one active Slave at any time
SPI Port Operation (Master Mode)
- Loading Data into SPIBUF initiates an SPI Output
- Data drops through into SPISR
- Data is shifted serially out of SDO under control of SCK
- Data is shifted serially into DSK
- Data drops through into SPISR
- Interrupt Flag SPIIF goes high on completion of the 8/16-bit shift operation
- Data can be 8-bit or 16-bit (selectable)
- Loading Data into SPIBUF initiates an SPI Output
SPI Waveforms
- Data written to SPIBUF
- CLK Starts on transfer to SPISR
- SDO updated on -VE edge of CLK (+VE also possible)
- SDI samples on +VE edge of CLK (-VE also possible)
- SDO updated on -VE edge of CLK (+VE also possible)
- CLK Starts on transfer to SPISR
- After 8/16 shifts SPIIF goes high
- Data written to SPIBUF
MOSI and MISO
- May be alternatives terms for SDO and SDI
- MOSI - Master Out, Slave IN
- Pin connects to SDO in Master mode
- Pin Connects to SDI in Slave Mode
- MISO
- Pin connects to SDI in Master mode
- Pin connects to SDO in slave mode
SPI on MBED
- MBED supports Master and Slave modes
- uses MISO and MOSI
- SPI
- format
- frequency
- write
- MBED supports Master and Slave modes
SPI Data Transmission Modes
- Clock can idle, high, or low
- Data can be O/P or I/P on +VE OR -VE edge of SCK
Input Via SPI Master
- No direct way of inputting via SPI Master
- Output dummy data, SPI Port reads in, while outputting dummy data
- write() returns an integer
- Which is the data input whilst outputting its operand
Informationen
- Beschreibung
- Degree EL560 (Microcontroller Engineering) Mindmap am Lecture 11 - Serial Peripheral Interface (1), erstellt von Tom Revise am 03/01/2021.
- Erstellt von
- Tom Revise
- Aufrufe
- 0
- Bewertung