CN112214440A - Communication method based on SPI communication - Google Patents
Communication method based on SPI communication Download PDFInfo
- Publication number
- CN112214440A CN112214440A CN202011075706.6A CN202011075706A CN112214440A CN 112214440 A CN112214440 A CN 112214440A CN 202011075706 A CN202011075706 A CN 202011075706A CN 112214440 A CN112214440 A CN 112214440A
- Authority
- CN
- China
- Prior art keywords
- spi
- pin
- data
- communication
- slave
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 34
- 238000004891 communication Methods 0.000 title claims abstract description 32
- 238000000034 method Methods 0.000 title claims abstract description 21
- 235000015429 Mirabilis expansa Nutrition 0.000 claims abstract description 10
- 244000294411 Mirabilis expansa Species 0.000 claims abstract description 10
- 235000013536 miso Nutrition 0.000 claims abstract description 10
- 239000000872 buffer Substances 0.000 claims abstract description 4
- 230000003139 buffering effect Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
Abstract
The invention relates to the technical field of communication, in particular to a communication method based on SPI communication, which solves the problem that when a slave device is required to process data and the master device passively acquires the data, the master device and the slave device frequently interact with each other, thereby improving the system performance; the communication method comprises the SPI main equipment, the SPI slave equipment and four groups of original connecting wires, wherein two ends of the four groups of original connecting wires are respectively and electrically connected with a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI main equipment and a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI slave equipment; the SPI master device is electrically connected with the SPI slave device through the READY pulse line; the communication method comprises the following steps: the SPI slave device processes data, buffers the data, sends a 500HZ pulse signal through a READY pulse line, and the SPI master device listens to the signal and reads the data.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a communication method based on SPI communication.
Background
As is well known, SPI is an abbreviation of Serial Peripheral Interface (Serial Peripheral Interface), and is a high-speed, full-duplex and synchronous communication bus, and only four wires are occupied on the pins of the chip, so that the pins of the chip are saved, and meanwhile, space is saved in the layout of the PCB, which provides convenience, and due to the characteristics of simplicity and ease of use, more and more chips nowadays integrate the communication protocol, such as AT91RM9200,
SPI adopts Master-slave mode communication mode, SPI Master (SPI Master) provides clock signal for SPI communication, is the initiative side of communication, SPI slave (SPI Salve) is the passive side of SPI communication process, the receiving and dispatching process is all controlled by SPI Master, Master and slave realize physical connection through four lines, the MISO of Master and slave is connected respectively to four lines, MOSI, CS and SCK pin, the function of the pin of connecting through the connecting wire is as follows:
1. SCK pin: a serial clock signal provided by the master device;
2. MOSI pin: master device data output and slave device data input;
3. MISO pin: a master device data input and a slave device data output;
4. a CS pin: a slave enable signal controlled by the master device;
at present, because the SPI master device lacks a communication mechanism in which the SPI slave device actively transmits data and the SPI master device receives the data in the communication process between the SPI master device and the SPI slave device, the SPI-based communication protocol requires frequent interaction between the SPI slave device and the SPI master device to process the data, thereby causing performance degradation.
Disclosure of Invention
In order to solve the technical problem, the invention provides a communication method based on SPI communication, which solves the problem that when a slave device is required to process data and the master device passively acquires the data, the master device and the slave device frequently interact with each other, thereby improving system performance.
The communication method based on the SPI communication comprises SPI main equipment, SPI slave equipment and four groups of original connecting wires, wherein two ends of the four groups of original connecting wires are respectively and electrically connected with a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI main equipment and a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI slave equipment; the SPI master device is electrically connected with the SPI slave device through the READY pulse line;
the communication method comprises the following steps:
the SPI slave device processes data, buffers the data, sends a 500HZ pulse signal through a READY pulse line, and the SPI master device listens to the signal and reads the data.
Compared with the prior art, the invention has the beneficial effects that: increase a READY pulse line in the SPI interface protocol line of basis, after SPI slave unit data processing and buffering are successful, send pulse signal notice SPI master device and read data, access the mode of READY pulse line, make SPI slave unit initiative notice SPI master device obtain data, SPI master device inquiry number of times has been reduced, therefore, need not "handshake" between slave unit and the master device and negotiate the data bulk that master device sent to the slave unit, compare with prior art, master device and slave unit interaction number of times has been reduced, thereby can improve communication transmission's performance, SPI master device buffering resource reduces, the performance is showing and is promoting, calorific capacity reduces.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a flow chart of the operation of the present invention;
in the drawings, the reference numbers: 1. an SPI master device; 2. an SPI slave device; 3. original connecting wires; 4. READY pulse line.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1 and fig. 2, the communication method based on SPI communication of the present invention includes an SPI master device 1, an SPI slave device 2, and four groups of original connecting wires 3, wherein two ends of the four groups of original connecting wires 3 are electrically connected to a MISO pin, a MOSI pin, a CS pin, and an SCK pin of the SPI master device 1, and a MISO pin, a MOSI pin, a CS pin, and an SCK pin of the SPI slave device 2, respectively; the SPI master device 1 is electrically connected with the SPI slave device 2 through the READY pulse line 4;
the communication method comprises the following steps:
the SPI slave 2 processes the data, buffers the data, and sends a 500HZ pulse signal over READY pulse line 4, which is heard by the SPI master 1 and reads the data.
Increase a READY pulse line 4 in the SPI interface protocol line of basis, after SPI slave unit 2 data processing and buffering are successful, send pulse signal notice SPI master 1 and read data, access the mode of READY pulse line 4, make SPI slave unit 2 initiatively inform SPI master unit 1 and obtain data, SPI master unit 1 inquiry number of times has been reduced, therefore, need not "handshake" between slave unit and the master unit and negotiate the data bulk that master unit sent to the slave unit, compare with prior art, master unit and slave unit interaction number of times has been reduced, thereby can improve communication transmission's performance, SPI master unit 1 buffering resource reduces, the performance is showing and promotes, calorific capacity reduces.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (1)
1. A communication method based on SPI communication is characterized by comprising SPI main equipment (1), SPI slave equipment (2) and four groups of original connecting wires (3), wherein two ends of the four groups of original connecting wires (3) are respectively and electrically connected with a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI main equipment (1) and a MISO pin, a MOSI pin, a CS pin and an SCK pin of the SPI slave equipment (2); the SPI bus is characterized by further comprising a READY pulse line (4), wherein the SPI bus master device (1) and the SPI bus slave device (2) are electrically connected through the READY pulse line (4);
the communication method comprises the following steps:
the SPI slave device (2) processes data, then buffers the data, sends out a 500HZ pulse signal through a READY pulse line (4), and the SPI master device (1) listens to the signal and reads the data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011075706.6A CN112214440A (en) | 2020-10-10 | 2020-10-10 | Communication method based on SPI communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011075706.6A CN112214440A (en) | 2020-10-10 | 2020-10-10 | Communication method based on SPI communication |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112214440A true CN112214440A (en) | 2021-01-12 |
Family
ID=74052907
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011075706.6A Pending CN112214440A (en) | 2020-10-10 | 2020-10-10 | Communication method based on SPI communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112214440A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114528235A (en) * | 2022-01-21 | 2022-05-24 | 厦门亿联网络技术股份有限公司 | SPI (Serial peripheral interface) -based communication method, slave equipment and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1347611A (en) * | 1999-04-19 | 2002-05-01 | 默勒股份有限公司 | Data transmission device |
US20020120795A1 (en) * | 2001-02-28 | 2002-08-29 | Alcatel | Serial peripheral interface master device, a serial peripheral interface slave device and a serial peripheral interface |
CN101076788A (en) * | 2004-04-26 | 2007-11-21 | 爱特梅尔股份有限公司 | Bi-directional serial interface for communication control |
CN103077144A (en) * | 2012-12-28 | 2013-05-01 | 上海自动化仪表股份有限公司 | Serial peripheral interface (SPI) communication interface for ensuring data integrity, and communication method thereof |
-
2020
- 2020-10-10 CN CN202011075706.6A patent/CN112214440A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1347611A (en) * | 1999-04-19 | 2002-05-01 | 默勒股份有限公司 | Data transmission device |
US7257656B1 (en) * | 1999-04-19 | 2007-08-14 | Moeller Gmbh | Device for synchronous transmission of data between a master device and a slave device |
US20020120795A1 (en) * | 2001-02-28 | 2002-08-29 | Alcatel | Serial peripheral interface master device, a serial peripheral interface slave device and a serial peripheral interface |
CN101076788A (en) * | 2004-04-26 | 2007-11-21 | 爱特梅尔股份有限公司 | Bi-directional serial interface for communication control |
CN103077144A (en) * | 2012-12-28 | 2013-05-01 | 上海自动化仪表股份有限公司 | Serial peripheral interface (SPI) communication interface for ensuring data integrity, and communication method thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114528235A (en) * | 2022-01-21 | 2022-05-24 | 厦门亿联网络技术股份有限公司 | SPI (Serial peripheral interface) -based communication method, slave equipment and system |
CN114528235B (en) * | 2022-01-21 | 2024-05-31 | 厦门亿联网络技术股份有限公司 | SPI-based communication method, slave device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100468378C (en) | SPI apparatus telecommunication circuit | |
JP6061868B2 (en) | Serial interface | |
CN108111382B (en) | Communication device based on I3C bus and communication method thereof | |
US20090063717A1 (en) | Rate Adaptation for Support of Full-Speed USB Transactions Over a High-Speed USB Interface | |
CN108255776B (en) | I3C master device compatible with APB bus, master-slave system and communication method | |
CN112003775B (en) | Single-level single-wire full-duplex bus communication method and system | |
CN110955625A (en) | Full-duplex real-time communication method and device based on SPI | |
CN1333560C (en) | High-performance optical fibre CAN communication system for strong electromagnetism interference environment | |
CN112214440A (en) | Communication method based on SPI communication | |
CN111858459B (en) | Processor and computer | |
KR20210075878A (en) | I3c hub promoting backward compatibility with i2c | |
CN116126771A (en) | Communication system and method for two-wire SPI | |
CN112965927B (en) | Signal driving system and method based on SPI equipment | |
CN210924562U (en) | Backboard communication device | |
CN209860929U (en) | Communication bus structure | |
CN112199312A (en) | Interface conversion device of communication equipment and communication system | |
CN104978294A (en) | Compatible device of serial peripheral interface, serial peripheral interface and host device | |
CN117009276B (en) | Method, device and system for signal compression transmission based on AXI bus | |
CN207976877U (en) | Data transmission system | |
CN114116559B (en) | High-speed bus method suitable for PLC application | |
CN220137680U (en) | Simulator supporting asynchronous communication interface | |
CN216670617U (en) | Computer module, mainboard and computer equipment | |
CN214540751U (en) | Device and musical instrument for connecting USB MIDI interface and MIDI DIN interface | |
CN214311734U (en) | Communication device based on SPI communication interface | |
CN217821596U (en) | SDR heterogeneous prototype system based on FPGA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210112 |
|
RJ01 | Rejection of invention patent application after publication |