SPI Interface Introduction

Publisher:快乐的旅程Latest update time:2014-12-18 Source: laogu Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
   I came across a flash using the SPI interface these days, and then I realized that flash can also be serial. It seems that I was really ignorant before. I found some information about the SPI interface, but it was not complete. Later, I found some English information, translated it, and combined it with my personal understanding to make an article. I hope it will be helpful to beginners.

   The full name of the SPI interface is "Serial Peripheral Interface", which means serial peripheral interface. It was first defined by Motorola on its MC68HCXX series processors. The SPI interface is mainly used in EEPROM, FLASH, real-time clock, AD converter, and between digital signal processors and digital signal decoders.

   The SPI interface is a synchronous serial data transmission between the CPU and peripheral low-speed devices. Under the shift pulse of the master device, the data is transmitted bit by bit, with the high bit first and the low bit last. It is full-duplex communication. The data transmission speed is generally faster than the I2C bus, and the speed can reach several Mbps.

   The SPI interface works in a master-slave mode. This mode usually has a master device and one or more slave devices. Its interface includes the following four signals:

(1) MOSI - master device data output, slave device data input
(2) MISO - master device data input, slave device data output
(3) SCLK - clock signal, generated by the master device
(4) /SS - slave device enable signal, controlled by the master device



      In point-to-point communication, the SPI interface does not require addressing operations and is full-duplex communication, which is simple and efficient.
      In a system with multiple slave devices, each slave device requires an independent enable signal, and the hardware is slightly more complicated than the I2C system.



    The SPI interface is actually two simple shift registers in the internal hardware. The data transmitted is 8 bits. Under the slave device enable signal and shift pulse generated by the master device, the data is transmitted bit by bit, with the high bit first and the low bit last. As shown in the figure below, the data changes on the falling edge of SCLK, and a bit of data is stored in the shift register at the same time.
   
     Diagram of the internal hardware of the SPI interface:
         
     Finally, a disadvantage of the SPI interface is that there is no specified flow control and no response mechanism to confirm whether the data has been received.
Reference address:SPI Interface Introduction

Previous article:Bluetooth and MSP430 Audio Sink Reference Design
Next article:About single-button switch circuit

Recommended ReadingLatest update time:2024-11-16 16:22

Programmable logic PLD and CPU configuration W-CDMAmodem
introduction Judging from the number of users and the types of services to be supported, society takes high-speed Internet access for granted in advanced information services, and voice and low-rate data services are not enough to meet user requirements. The need to support multimedia services that consume large amo
[Industrial Control]
RISC-V, the third largest CPU architecture to replace x86 and ARM, is not qualified: at least not in terms of high performance.
Among the current main CPU instruction systems, x86 dominates the desktop and data center fields, ARM is the king of mobile chips, and the open and open source RISC-V has developed rapidly and has become the third largest CPU system. Since it is not subject to blockade restrictions, RISC-V has also been popular with
[Embedded]
Advantech launches EPC-B3000 series of embedded industrial computers, equipped with advanced X86 architecture CPU, to help upgrade edge artificial intelligence applications
Advantech launches EPC-B3000 series of embedded industrial computers, equipped with advanced X86 architecture CPU , to help upgrade edge artificial intelligence applications Advantech, a global supplier of embedded computing solutions, grandly launches the high-performance embedded industrial compu
[Industrial Control]
Advantech launches EPC-B3000 series of embedded industrial computers, equipped with advanced X86 architecture CPU, to help upgrade edge artificial intelligence applications
Qualcomm releases Snapdragon 690: CPU speed increased by 20%, supports 5G and Wi-Fi 6
       Qualcomm today released its first 6-series Snapdragon mobile chipset that supports 5G, the Snapdragon 690. Built on an 8nm process, it is the successor to the Snapdragon 675. This new chipset is paired with the X51 modem and supports 5G networks. Qualcomm hopes to make 5G more popular with this chip, and HMD, L
[Mobile phone portable]
Arteris expands automotive solutions for Armv9 architecture CPUs
Arteris fulfills its previously announced collaboration with Arm to provide simulation-based verification systems for designs based on Armv9 and CHI-E, accelerating automotive electronics innovation. Arteris aligns with Arm's roadmap to provide optimized and pre-validated high-bandwidth, low-latency Ncore cache-c
[Automotive Electronics]
STM8 and Assembly Language (13) - Modifying the CPU clock
In some MCU application systems, the CPU does not need to run at a high frequency. Running at a low frequency will greatly reduce the power consumption of the chip. Therefore, it is hoped that the MCU can provide this function. The STM8 MCU does have this function, and it is also very convenient to modify. The follo
[Microcontroller]
How the immune system of domestic CPUs was developed
On April 19, 2016, General Secretary Xi Jinping stressed the need to establish a correct view of cybersecurity, accelerate the construction of a security system for critical information infrastructure, and enhance cybersecurity defense and deterrence capabilities. The correct view of cybersecurity is the "overall na
[Mobile phone portable]
How the immune system of domestic CPUs was developed
Not just CPU, details on mobile GPU (Part 1)
With the advent of the mobile computing era, the application scope of handheld devices has been greatly broadened. From the early days when mobile phones could only make calls, send text messages, and view pictures, to today when mobile phones can watch high-definition videos, play 3D games, and have various cool oper
[Analog Electronics]
Not just CPU, details on mobile GPU (Part 1)
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号