Basic concepts and functions of SPI bus protocol (1)

Source: Internet
Author: User
Tags sdo

Whether in the network or communication field, as long as it is related to electronics or intelligence, you can find that they all have certain protocols. Now we will introduce the SPI bus protocol. The SPI bus protocol is a communication protocol. What is its concept? Now let's take a look at it from the article.

SPI, short for Serial Peripheral Interface, is a Serial Peripheral Interface. SPI is a high-speed, full-duplex, synchronous communication bus, and occupies only four lines on the chip pins, saving the chip pins, at the same time, it saves space for PCB layout and provides convenience. It is precisely because of this simple and easy-to-use feature that more and more chips are integrated with this SPI bus protocol.

SPI is a ring bus structure consisting of ss (cs), sck, sdi, and sdo. Its timing is actually very simple, mainly under the control of sck, two two-way shift registers for data exchange.

Send at the rising edge, receive at the falling edge, and send at the high level first.

When the rising edge arrives, the sdo level will be sent to the register of the slave device.

When the descent edge arrives, the level on sdi will be received to the register of the master device.

Assume that the host and slave are ready for initialization: And the sbuff of the host is 0xaa (10101010), and The sbuff of the slave is 0x55 (01010101 ), the following shows the data of the eight clock periods in the SPI bus protocol step by step (assuming that the rising edge sends data ).

----------------------------------
Pulse host sbuff slave sbuff sdisdo
----------------------------------
000-0 10101010 01010101 0 0
----------------------------------
10--1 0101010x10101011 0 1
11--0 01010100 10101011 0 1
----------------------------------
20-1 1010100x01010110 1 0
21--0 10101001 01010110 1 0
----------------------------------
30-1 0101001x10101101 0 1
31--0 01010010 10101101 0 1
----------------------------------
40-1 1010010x01011010 1 0
41--0 10100101 01011010 1 0
----------------------------------
50-1 0100101x10110101 0 1
51--0 01001010 10110101 0 1
----------------------------------
60-1 1001010x01101010 1 0
61--0 10010101 01101010 1 0
----------------------------------
70--1 0010101x11010101 0 1
00101010 11010101 0 1
----------------------------------
80-1 0101010x10101010 1 0
81--0 01010101 10101010 1 0
----------------------------------


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.