Hey dudes, the following interesting questions related to I2C and SPI protocol can be used for discussion.
1. Can devices be added and removed while the system is running (Hot swapping) in I2C ?
2. What is the standard bus speed in I2C ?
3. How many devices can be connected in a standard I2C communication ?
4. What are the 2 roles of nodes in I2C communication ?
5. What are the modes of operation in I2C communication ?
6. What is bus arbitration ?
7. Advantages and limitations of I2C communication ?
8. How many wires are required for I2C communication ? What are the signals involved in I2C ?
9. What is START bit and STOP bit ?
10. How will the master indicate that it is either address / data ? How will it intimate to the slave that it is going to either read / write ?
11. Is it possible to have multiple masters in I2C ?
12. In write transaction, the Master monitors the last ACK and issues STOP condition - True/False ?
13. In read transaction, the master doesnot acknowledge the final byte it receives and issues STOP condition - True/False ?
14. What is SPI communication ?
15. How many wires are required for SPI communication ?
16. What are the 4 logic signals specified by SPI bus ?
17. Does SPI slave acknowledge the receipt of data ?
18. SPI has higher throughput than I2C - True / False ?
19. Is it better to use I2C or SPI for data communication between a microprocessor and DSP ?
20. Is it better to use I2C or SPI for data communication from ADC ?
21. Duplex communication is possible by simultaneously using MOSI and MISO during each SPI clock cycle - True / False ?
22. Is it possible to connect SPI slaves in daisy chain ?
23. What is the role of shift register in Master and Slave devices in SPI ?
24. How will the master convey that it is stopping the transmission of data ?
25. What is bit banging ?
Hope , the above are the main possible embedded interview questions related to I2C/SPI protocol ! All the best :-)
1) yes
ReplyDelete2) 100kbps
ReplyDelete3)127
ReplyDeleteThis comment has been removed by the author.
Delete4) master and slave
ReplyDelete5) master transmit,master receive, slave transmit,slave receive
ReplyDelete2)128(119-actual slaves connected +1 is general call+8 are reserved)
ReplyDeleteThis comment has been removed by the author.
Delete3)128(112-slaves are connected+16 are reserved addresses)
ReplyDelete6) When two masters try to speak with same slave then the Master whose address bit goes high wrt to other looses bus access and the other one whose address bit goes low gets bus access.
ReplyDelete8) How many wires are required for I2C communication ? What are the signals involved in I2C ?
ReplyDeleteAns: Two wires, a.SCL (serial clock), b. SDA (serial data)
SCL- Master generates the clock signal on SCL pin
SDA- Data is transmitted or received on SDA pin.
9. What is START bit and STOP bit ?
ReplyDeleteSTART & STOP are the conditions that are generated by master to start & stop I2C communication.
START condition is generated when master initiates data transfer & STOP condition is generated when master wants to end data transfer.
In a write transaction (slave receiving), when the master is done transmitting all of the data bytes it wants to send, it monitors the last ACK and then issues the stop condition (P). In a read transaction (slave transmitting), the master does not acknowledge the final byte it receives. This tells the slave that its transmission is done. The master then issues the stop condition.
ReplyDelete100 kbps is standard speed, 400 kbps is full speed and 3.4 mbps full speed of the I2C commnication
ReplyDelete7. Advantages and limitations of I2C communication ?
ReplyDeleteAdvantages:-
1. only two wires are required
2. hot pluggable.
3. we can connect up to 128 in that 16 are reserved.
4. it's the address dependent protocol
5. we can communicate multiple identical slaves at a time.
6. it's multi master protocol.
Limitation:-
1. speed is too less when compare to other protocol.
2. very complex protocol.
3. distance of communication also less.
4. acknowledgement is necessary for each byte transfer.
I2C is a byte protocol, with standard structure mostly used in RTC, EEPROM applications
5) the mode of operation is read and write . The address bit is 8 bit . The first 7 bit represent address of slave device , 8 bit will tell read or write . If it 0 - write , 1 - read operation
ReplyDelete11) yes
ReplyDelete12) True
ReplyDeleteHaving few doubts
ReplyDelete1) What will happen if Negative acknowledge received(NCK) in between I2C communication of more than 1 bytes?
15) 4.
ReplyDelete16) 1.MOSI(SDO)-Master out slave in
2.MISO(SDI)-Master in slave out
3.SCLK- Serial clock
4.CS - chip select
17) NO
18) TRUE
21) TRUE
22) YES
25) Bitbanging is process of implementing the spi on general io's other than serial io's.
24) Master will deselect/deactive the CS of the particular slave
ReplyDelete