This set of Microcontroller Multiple Choice Questions & Answers (MCQs) focuses on “SPI Protocol”.
1. What is the function of the CE pin in SPI?
a) it is used for synchronization
b) it is used as a transmitting pin
c) it is used as a receiving pin
d) it is used to initiate and terminate the data transfer
2. Which of the following is correct?
a) MOSI has the same meaning as the SDO
b) SCLK is used to initiate and terminate the data transfer
c) In 3 wire SPI, there is only one pin for transmission and reception
d) In 3 wire SPI, there are three pins MOSI, MISO and SCLK
3. Why do we make the connection of the SCLK for communicating serially between two devices?
a) to get a clock output from the device
b) to synchronize the two devices
c) to obtain an analog output
d) all of the mentioned
4. If CPHA= 0 and CPOL=1, then which of the following is true?
a) read on rising edge, changed on a falling edge
b) read on falling edge, changed on a rising edge
c) write on rising edge, changed on a falling edge
d) write on rising edge, changed on a falling edge
5. In AVR, which of the following registers are used for SPI?
d) All of the mentioned
6. SPI can act as a half duplex transmission?
c) depends on the conditions
d) can’t be said
7. In SPI write, LSB goes first?
c) can’t be said
d) depends on the cases
8. How do we set the SPI, to operate in the master mode 1?
a) We set the MSTR bit, and make the CPOL= 1 and CPHA=0
b) We set the MSTR bit, and make the CPOL= 0 and CPHA=1
c) We reset the MSTR bit, and make the CPOL= 1 and CPHA=0
d) We reset the MSTR bit, and make the CPOL= 0 and CPHA=1
9. Which frequency is not recommended for SPI clock?
10. To select the value of the clock to be fosc/16, what are the appropriate values?
a) SPI2X= 0, SPR1= 0, SPR0=1
b) SPI2X= 0, SPR1= 1, SPR0=0
c) SPI2X= 1, SPR1= 1, SPR0=0
d) SPI2X= 0, SPR1= 1, SPR0=1