9. SPI Communication
Fire Bird V robot can be interfaced with more than 30 sensors at the same time. ATMEGA2560
does not have sufficient number of ADC available of sensor interfacing. Hence ATMEGA8
microcontroller is connected with ATMEGA2560 microcontroller over the SPI port. Jumper J4
needs to be removed before attempting to do ISP with ATMEGA2560 and ATMEGA8 as there
SPI lines are connected with the jumper J4. For more details on the jumpers, refer to the section
3.19.6 in the Hardware Manual.
9.1 Concept of SPI communication
The Serial Peripheral Interface (SPI) allows high-speed synchronous data transfer between
several peripheral devices or between microcontrollers. ATMEGA2560 and ATMEGA8 both
have inbuilt SPI peripheral. SPI pins consist of MOSI (Master Output Slave Input), MISO
(Master Input Slave Output), SCK (Serial Clock) and SS* (Slave Select).
Features of the SPI communication:
• Full-duplex, Three-wire Synchronous Data Transfer
• Master or Slave Operation
• LSB First or MSB First Data Transfer
• Seven Programmable Bit Rates
• End of Transmission Interrupt Flag
• Write Collision Flag Protection
• Wake-up from Idle Mode
• Double Speed (CK/2) Master SPI Mode
SPI communication process:
The basic operation of SPI involves the Master initiating the communication.
• Master sets the SS (Slave Select) pin low to tell the slave that communication is about to
start.
• The master writes a byte onto MOSI (Master Output Slave Input) pin and the slave does
the same on the MISO (Master Input Slave Output) pin.
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
Figure 9.1: SPI Interface Block Diagram
Fire Bird V ATMEGA2560 Software Manual
111
Need help?
Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?