What is the role of the SPI master in SPI master-slave architecture?
The SPI master controls the clock signal and initiates communication with the slave devices. It sends data and receives data from the slaves.
Click to reveal answer
beginner
What does the SPI slave do in the SPI master-slave architecture?
The SPI slave waits for the master to provide the clock and data signals. It responds to the master's commands by sending or receiving data.
Click to reveal answer
beginner
Name the four main signals used in SPI communication.
The four main signals are: SCLK (Serial Clock), MOSI (Master Out Slave In), MISO (Master In Slave Out), and SS (Slave Select).
Click to reveal answer
beginner
Why is the Slave Select (SS) line important in SPI?
The SS line tells the slave device when it should listen and respond. When SS is active (usually low), the slave is selected and communicates with the master.
Click to reveal answer
intermediate
How does SPI achieve full-duplex communication?
SPI uses separate lines for sending (MOSI) and receiving (MISO) data, allowing the master and slave to send and receive data simultaneously.
Click to reveal answer
Which SPI signal is controlled by the master to synchronize data transfer?
AMOSI
BSCLK
CMISO
DSS
✗ Incorrect
The master controls the Serial Clock (SCLK) to synchronize data transfer between master and slave.
What happens when the Slave Select (SS) line is inactive (high)?
AThe master stops sending clock
BThe slave listens and responds
CThe slave ignores communication
DData is sent on MISO only
✗ Incorrect
When SS is inactive (usually high), the slave ignores communication and does not respond.
In SPI, which line carries data from the master to the slave?
AMISO
BSCLK
CSS
DMOSI
✗ Incorrect
MOSI stands for Master Out Slave In, carrying data from master to slave.
Which of the following is true about SPI communication?
AIt is full-duplex
BIt uses a single data line
CIt does not use a clock
DIt is half-duplex
✗ Incorrect
SPI is full-duplex because it uses separate lines for sending and receiving data simultaneously.
Who generates the clock signal in SPI communication?
AMaster
BSlave
CBoth master and slave
DExternal oscillator
✗ Incorrect
The master device generates the clock signal (SCLK) to control timing.
Explain the roles of master and slave in SPI master-slave architecture.
Think about who starts communication and who follows.
You got /4 concepts.
Describe how SPI achieves simultaneous sending and receiving of data.
Consider the data lines and clock signal.
You got /3 concepts.
Practice
(1/5)
1. In SPI master-slave architecture, who controls the clock signal?
easy
A. The master device controls the clock signal.
B. The slave device controls the clock signal.
C. Both master and slave share clock control equally.
D. No clock signal is used in SPI communication.
Solution
Step 1: Understand SPI roles
In SPI, the master initiates communication and controls timing.
Step 2: Identify clock control
The master generates the clock signal to synchronize data transfer.
Final Answer:
The master device controls the clock signal. -> Option A
Quick Check:
Master controls clock = A [OK]
Hint: Master always controls clock in SPI [OK]
Common Mistakes:
Thinking slave controls clock
Assuming no clock is needed
Believing clock is shared equally
2. Which of the following is the correct way to select a slave device in SPI using embedded C?
easy
A. Send a special data byte to select the slave.
B. Set the slave select (SS) pin HIGH to select the slave.
C. Toggle the clock pin to select the slave.
D. Set the slave select (SS) pin LOW to select the slave.
Solution
Step 1: Recall SPI slave selection method
In SPI, the master selects a slave by pulling its SS pin LOW.
Step 2: Understand pin logic
Setting SS LOW activates the slave; HIGH deselects it.
Final Answer:
Set the slave select (SS) pin LOW to select the slave. -> Option D
Quick Check:
SS LOW selects slave = A [OK]
Hint: SS pin LOW means slave selected [OK]
Common Mistakes:
Setting SS HIGH to select slave
Using clock pin to select slave
Sending data to select slave
3. Given this embedded C code snippet for SPI master: