Professional Documents
Culture Documents
Engineering
By Nushara Wedasingha
Mphil Candidate(AI), Bsc.(Hons) in
EEE
EEE Department
Faculty of Engineering
Sri Lanka Institute of Information
Technology
What is SPI?
• It is stands for “Serial Peripheral Interface”.
• It was found in 1985 by Motorola to increase the throughput speed of I2C.
• To Obtain that speed a new signal was introduced where information from the MCU is sent
to the peripheral known as “Slave”.
• SPI is bit expensive than I2C because it requires more logic gates to analyze the additional
signal.
• It is found in NOR flash, EEPROM, EERAM, SRAM, LCD, SD and RTC.
• This is also known as the “Four Wired Bus” because it requires four wires to complete the
communication.
Four Modes of SPI
It is used to build the relationship between the slave select, data, and clock lines with clock
phase and clock polarity.
• Non-Inverted Clock Polarity.
1. Mode 1: Clock phase is configured for sampling data at falling edge and
shifting data at rising edge.
2. Mode 2: Clock phase is configured for sampling data at rising edge and
shifting data at falling edge.
• Inverted Clock Polarity.
3. Mode 3: Clock phase is configured for sampling data at falling edge and
shifting data at rising edge.
4. Mode 4: Clock phase is configured for sampling data at rising edge and
shifting data at falling edge.
Key Terms
• Setting Up SPI
• Setting Up Pin
• Transmitting Data
While(1) {
UCA0TXBUF = 0X4D
}
THANK YOU