7 Serial Interfaces 2 Flashcards Preview

EE10140 Metcalfe > 7 Serial Interfaces 2 > Flashcards

Flashcards in 7 Serial Interfaces 2 Deck (16)
Loading flashcards...
1
Q

SPI ?

A

Serial Peripheral Interface

2
Q

SPI created?

A

• SPI was developed by Motorola, it is also known as MicroWire, QSPI or “4-wire serial”

3
Q

SPI overview details?

A
  • It is a synchronous serial communication bus
  • Primarily used for serial communication between a host processor and peripherals
  • SPI works in a master-slave configuration, with the master being the host microcontroller, for example, and the slave being the peripheral device
4
Q

SPI diagram?

A
5
Q

SPI connections?

A
  • Serial Clock(SCLK)
  • Chip Select(CS)
  • Serial Data In (SDI) / Master Out Slave In (MOSI)
  • Serial Data Out(SDO) / Master In Slave Out (MISO)
6
Q

Serial Clock (SCLK)?

A

Data is transferred synchronously to this clock, generated by the master device

7
Q

Chip Select (CS)?

A

All data on the bus is ignored by the slave device unless it’s chip select pin is asserted (almost always active low)

8
Q

Serial Data In (SDI) / Master Out Slave In (MOSI)?

A

Unidirectional data transfer port from the master device into the slave device

9
Q

Serial Data Out(SDO) / Master In Slave Out (MISO)?

A

Unidirectional data transfer port from slave device into the master device

10
Q

SPI Operation?

A
  • There is only one master device, but there can be any number of slaves depending on the number of chip select lines of the master
  • Operates up to about 2 MHz (but maybe more if you ignore the specs..)
  • Master sends out clocks and chip selects. Activates the slaves it wants to communicate with, possibly multiple slaves!
  • So we can write to multiple devices all at once
11
Q

SPI Multi-Slave operation?

A
  • The SPI port of each slave is designed to send out during the second group of clock pulses an exact copy of the data it received during the first group of clock pulses
  • The whole chain acts as a communication shift register
  • Such a feature only requires a single SS/CS line from the master, rather than a separate SS/CS line for each slave
12
Q

How is transfer started in SPI?

A

Transfer started by the master pulling CS/SS low, data is then transferred according to the device data sheet

13
Q
A

SPI timing diagram?

14
Q

What is Bit-Banging?

A

Software that is written if there is no dedicated SPI hardware interface, to control each pin.

15
Q

Advantages of SPI?

A
  • Complete protocol flexibility for the bits transferred
  • Not limited to 8-bit words
  • Arbitrary choice of message size, content, and purpose
  • Extremely simple
  • No arbitration
  • Slaves use the master’s clock, and do not need precision oscillators
  • Slaves do not need a unique address
  • Uses only four pins on IC packages, far fewer than a parallel interface
  • Signals are unidirectional allowing for easy Galvanic isolation
  • Specification not limited to any maximum clock speed
16
Q

Disadvantages of SPI?

A
  • Can end up with lots of pins needed for all the chip selects
  • No hardware slave acknowledgment (the master could be transmitting to nowhere and not know it!)
  • Typically supports only one master device
  • No real formal standard, all a bit “hand wavy”, validating conformance is not possible
  • Only handles short distances
  • Many existing variations, making it difficult to find development tools that support those variations
  • SPI does not support hot swapping (dynamically adding nodes)
  • Some variants like Multi I/O SPI and three-wire serial buses are half-duplex