Table of Contents:
SPI has earned a solid role in embedded systems whether it is system on chip processors, both with higher end 32-bit processors such as those using ARM, MIC or Power PC and with other microcontrollers such as the AVR, PIC etc. These chips usually include SPI controllers capable of running in either master or slave mode. In-system programmable AVR controllers can be programmed using an SPI interface. Chip or FPGA based designs sometimes use SPI to communicate. So, SPI is a common technology used nowadays for communication with peripheral devices where we want to transfer data speedily and with in real time constraints. There are many serial interfaces right from Morse code telegraphy, RS232, USB, Fire wire, Ethernet and many more. Each serial interface offers advantages or disadvantages for many designs, depending on criteria such as needed data rate, space availability, and noise considerations.
Serial to Peripheral Interface (SPI) was one such technology developed to replace parallel interfaces so we don’t have to route parallel bus around PCB and provides high speed data transfer between the devices. Motorola was the first company that named SPI to a circuit technique used in the late 1970s in its first 68000-based MCU to connect it to peripheral functions and later adopted by others in the industry. It’s the simplicity of interfacing and the speed that allows communication or transferring data easily and made it popular communication protocol.
The Serial Peripheral Interface is a simple 4-wire serial communications interface used by many microprocessor/microcontroller peripheral chips that enables the controllers and peripheral devices to communicate with each other. In Serial peripheral interface data is shifted in /out one at a time and transmit data from master device to/from one or more slave devices over short distances and high speed. It is simply based on an 8 bit shift register shifting data out on a single pin and shifting data in on another pin. Another feature of SPI is that there is no concept of transferring the ownership of the bus i.e. changing the master and also there are no slave addresses. SPI is a much simpler protocol and because of this we can operate it at speeds greater than 10MH as compared to TWI. Some of the features that allows SPI widely used are-
1. Full duplex communication.
2. Higher throughput than TWI.
3. Not limited to 8 bit words in the case of bit transferring.
4. Simple hardware interfacing
5. Arbitrary choice of message sizes, contents and purpose.
6. Typically low power requirements
7. Slave uses master’s clock and does not require precision oscillators.
8. Lower power requirements than TWI due to less circuitry.
However, it would be unfair to compare TWI serial interface to SPI. Each of them have their area of application depending on the need of the system like some of the features that makes TWI equally valuable as SPI.
1. Less number of pins on IC packages than SPI
2. Hardware flow control is present
3. It has a formal standard unlike SPI
4. It addresses slaves before communication.
Now, we have a brief idea on SPI let’s understand the answers to the questions about why SPI is most preferred in PCB? What are the basic connections and how do they communicate? And lastly what is the future scope of SPI?