CN105719469A - SPI (serial peripheral interface) protocol based network relay system and operation method thereof - Google Patents

SPI (serial peripheral interface) protocol based network relay system and operation method thereof Download PDF

Info

Publication number
CN105719469A
CN105719469A CN201610052316.4A CN201610052316A CN105719469A CN 105719469 A CN105719469 A CN 105719469A CN 201610052316 A CN201610052316 A CN 201610052316A CN 105719469 A CN105719469 A CN 105719469A
Authority
CN
China
Prior art keywords
repeater
equipment group
spi
instruction
module
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
Application number
CN201610052316.4A
Other languages
Chinese (zh)
Inventor
李扬渊
刘霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Mairui Microelectronic Co Ltd
Original Assignee
Suzhou Mairui Microelectronic Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Mairui Microelectronic Co Ltd filed Critical Suzhou Mairui Microelectronic Co Ltd
Priority to CN201610052316.4A priority Critical patent/CN105719469A/en
Publication of CN105719469A publication Critical patent/CN105719469A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C2201/00Transmission systems of control signals via wireless link
    • G08C2201/40Remote control systems using repeaters, converters, gateways

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses an SPI (serial peripheral interface) protocol based network relay system and an operation method thereof. The SPI protocol based network relay system comprises a master control device, a relay device and a subordinate device group, wherein the subordinate device group comprises at least one standard slave device, the master control device and the relay device conform to an SPI communication protocol and are electrically connected with each other, the relay device comprises an instruction parsing module and an uplink module, and the master control module, the relay device and the subordinate device group can form an extendable tree topology structure. Compared with the prior art, the SPI protocol based network relay system and the operation method thereof have the advantages that the master control device only with one chip selection pin is capable of achieving chip selection for the subordinate device group, so that pin resources are saved for the master control device, and packaging wiring design is benefited.

Description

A kind of network trunk system based on SPI protocol and method of work thereof
Technical field
The present invention relates to the network trunk system based on SPI protocol in electronic information, particularly relate to the certain chip network trunk system based on SPI protocol, such as fingerprint sensor chip.
Background technology
Based on the usual not network consisting of communication of SPI protocol, and only realize point-to-point communication.Main control device to realize from the access of equipment, first having to select from equipment, namely carry out chip select.In the prior art, generally multiple chip select ends of main control device are respectively connecting to each chip select end from equipment, when certain chip select end is Low level effective signal, then choose corresponding from equipment execution.So main control device generally has two or more chip select pin.
And in reality, increasing application scenarios needs the function realizing many equipment and main control device Pin compatibility simultaneously, for instance fingerprint identification device, generally jointly completed function by many wafers.But whole fingerprint identification module is provided only a road SPI control line by main control device, so requiring over the mode of network trunk to control each wafer.
Summary of the invention
For above-mentioned weak point, the present invention provides a kind of network trunk system based on SPI protocol and method of work thereof, make signal that main control device sends can control different chips with trunking scheme respectively by a road SPI, and make main control device have only to a chip select pin just can to reach the purpose from equipment chip select.
For achieving the above object, the present invention adopts the following technical scheme that
A kind of network trunk system based on SPI protocol, this system includes:
Main control device, repeater and subordinate equipment group, wherein repeater includes command analysis module and uplink module, subordinate equipment group at least includes a standard from equipment, main control device and repeater are observed SPI communications protocol and are electrically connected, and repeater and subordinate equipment group are observed SPI communications protocol and be electrically connected.SPI communications protocol is prior art, does not repeat them here.
SCLK signal line in SPI communications protocol, MOSI holding wire forms the first bus:
The input 1 of the command analysis module of repeater is connected with the CS signal input part of repeater, input 2 is connected with the first bus input end of repeater, outfan 1 is connected with the CS signal output part of repeater, outfan 2 is connected with the first output end of main of repeater, and outfan 3 is connected with the input 2 of uplink module;
The input 1 of uplink module is connected with the MISO signal input part of repeater, the outfan 3 of input 2 link order parsing module, and outfan is connected with the MISO signal output part of repeater.
Further, the uplink module of repeater is MUX.
As further improved technical scheme of the present invention, the SCLK signal line in SPI communications protocol, CS holding wire and MOSI holding wire form the second bus:
The input of the command analysis module of repeater is connected with the second bus input end of repeater, and outfan is connected with the second output end of main of repeater;
The input of the uplink module of repeater is connected with the MISO signal input part of repeater, and outfan is connected with the MISO signal output part of repeater.
Further, each standard in subordinate equipment group includes command analysis module from equipment:
Each standard connects the second bus input end of this equipment from the input of the command analysis module of equipment, and outfan connects the second output end of main of this equipment.
Further, the uplink module of repeater is or logic circuit.
The method of work of a kind of network trunk system based on SPI protocol, comprises the following steps:
Step one, repeater receive chip selection signal and the instruction that main control device sends;
Step 2, send chip selection signal and instruction with repeater for root node to the corresponding ports of subordinate equipment group;
Step 3, repeater command analysis module instruction is resolved and according to analysis result chip select;
Step 4, subordinate equipment group send the uplink module performing result to repeater by corresponding output port;
Step 5, repeater uplink module the execution result received is fed back to main control device.
Further, in step 2, with repeater for root node to subordinate equipment group broadcast transmission chip selection signal and instruction;
In step 3, parsing concretely comprises the following steps with chip select:
Step S1: the command analysis module of repeater parses the address code of instruction, and is sent to uplink module, simultaneously by each standard in this address code broadcast transmission to subordinate equipment group from MOSI input port corresponding to equipment;
Step S2: the address code received is compared with the address code preset, the address code selecting with receiving
In identical repeater or subordinate equipment group, certain standard is from equipment;
In step 5, uplink module is MUX, and MUX selects certain standard in repeater or subordinate equipment group to feed back to main control device from the execution result of equipment according to the address code that command analysis module sends.
As further improved technical scheme of the present invention, in step 2, forward chip selection signal and instruction to the corresponding ports of subordinate equipment group with repeater for root node;
In step 3, parsing concretely comprises the following steps with chip select:
Step S1: in the command analysis module of repeater and subordinate equipment group, instruction is resolved by each standard from the command analysis module of equipment;
Step S2: compared with the instruction set preset by instruction analysis result, certain standard in the repeater selecting to comprise this instruction analysis result in instruction set or subordinate equipment group is from equipment.
Uplink module is or logic circuit.
Described repeater and subordinate equipment group can also form tree topology, and in subordinate equipment group, any one mark can be substituted by the combination of repeater and subordinate equipment group from equipment.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of a kind of network trunk system based on SPI protocol of embodiment one;
Fig. 2 is the uplink module schematic diagram of embodiment one;
Fig. 3 is the method for work schematic diagram of a kind of network trunk system based on SPI protocol;
Fig. 4 is the schematic diagram of a kind of network trunk system based on SPI protocol of embodiment two;
Fig. 5 is the uplink module schematic diagram of embodiment two;
Fig. 6 is the topological structure schematic diagram of a kind of network trunk system based on SPI protocol.
Detailed description of the invention
Workflow and advantage in order to make device that the present invention is previously mentioned are clearly clear and definite, and following Shenfu accompanying drawing examples, the present invention will be described in detail.
Below in conjunction with specific embodiment, the invention will be further described.Additionally, be likely in various embodiments use the label repeated or sign.These repeat only for simply clearly describing the present invention, do not represent and have any relatedness between discussed different embodiments and/or structure.
Embodiment one:
Refer to the schematic diagram of a kind of network trunk system based on SPI protocol that Fig. 1, Fig. 1 are embodiment one.As it is shown in figure 1, this system includes main control device 1, repeater 2, subordinate equipment group 3.Between main control device 1 and repeater 2, all in accordance with SPI communications protocol and be electrically connected between repeater 2 and subordinate equipment group 3.
SCLK signal line and MOSI holding wire in SPI communications protocol merge as the first bus (51).
Repeater 2 includes command analysis module 21 and uplink module 22.The input 1(2101 of command analysis module 21) it is connected with the CS signal input part 201 of repeater, input 2(2102) it is connected with the first bus input end 511 of repeater, outfan 1(2103) it is connected with the CS signal output part 202 of repeater, outfan 2(2104) be connected with the first output end of main 512 of repeater, outfan 3(2105) with the input 2(222 of uplink module 22) be connected;The input 1(221 of uplink module 22) be connected with the MISO signal input part 203 of repeater, input 2(222) the outfan 3(2105 of link order parsing module 21), outfan 1(223) it is connected with the MISO signal output part (204) of repeater.
Refer to the method for work schematic diagram that Fig. 3, Fig. 3 are a kind of network trunk system based on SPI protocol.As it is shown on figure 3, this method of work includes:
Step one, repeater receive chip selection signal and the instruction that main control device sends;
Step 2, send chip selection signal and instruction with repeater for root node to the corresponding ports of subordinate equipment group;
Step 3, repeater command analysis module instruction is resolved and according to analysis result chip select;
Step 4, subordinate equipment group send the uplink module performing result to repeater by corresponding output port;
Step 5, repeater uplink module the execution result received is fed back to main control device.
In this embodiment, wherein step 2, with repeater 2 for root node to the corresponding ports broadcast transmission chip selection signal of subordinate equipment group 3 and instruction.
Wherein step 3, the step of instruction parsing and chip select particularly as follows:
Step S1: the command analysis module 21 of repeater 2 parses the address code of instruction, and is sent to uplink module 22, simultaneously by this address code broadcast transmission to each standard in described subordinate equipment group 3 from MOSI input port corresponding to equipment;
Step S2: the address code received compared with the address code preset, selects in the repeater 2 identical with the address code received or subordinate equipment group 3 certain standard from equipment.
Such as main control chip 1 have sent instruction a0 to repeater 2, it is A1 that the command analysis module 21 of repeater 2 parses the address code of instruction a0, and this address code A1 is sent to uplink module 22. repeater 2 by each standard in address code A1 broadcast transmission to subordinate equipment group 3 from MOSI port corresponding to equipment.If the address code B1 that repeater 2 is preset is equal to A1, then drag down the chip selection signal of repeater 2;If the address code C1 that in subordinate equipment group 3, certain standard is preset from equipment is equal to A1, then drag down this standard chip selection signal from equipment.
Wherein, step 5, uplink module 22 is MUX, and MUX selects certain standard in repeater 2 or subordinate equipment group 3 to feed back to main control device 1 from the execution result of equipment according to the address code A1 that command analysis module 21 sends.Refer to the uplink module schematic diagram that Fig. 2, Fig. 2 are embodiment one.As in figure 2 it is shown, uplink module 22 is a MUX (MUX) in this embodiment.In subordinate equipment group 3, each standard is from the output data of the output data of equipment Yu repeater 2 self, after uplink module 22, selects one as exporting to the output data (output) of main control chip 1 according to given address code A1.
Embodiment two:
Refer to the schematic diagram of a kind of network trunk system based on SPI protocol that Fig. 4, Fig. 4 are embodiment two.As shown in Figure 4, between main control device 1 and repeater 2, all in accordance with SPI communications protocol and be electrically connected between repeater 2 and subordinate equipment group 3.
CS holding wire in SPI communications protocol, MOSI holding wire and SCLK signal line merge as the second bus 41.
Repeater includes command analysis module 21 and uplink module 22.The input (211) of command analysis module 21 connects the second bus input end 411 of repeater 2, and outfan (212) connects the second output end of main 412 of repeater 2;The input 1(221 of uplink module 22) be connected with repeater MISO signal input part 203, outfan 1(223) be connected with the MISO signal output part (204) of repeater.
Each standard in subordinate equipment group 3 includes command analysis module 21 from equipment: each standard connects the second bus input end of this equipment from the input of the command analysis module of equipment, and outfan connects the second output end of main of this equipment.
Refer to the method for work schematic diagram that Fig. 3, Fig. 3 are a kind of network trunk system based on SPI protocol.As it is shown on figure 3, this method of work includes:
Step one, repeater receive chip selection signal and the instruction that main control device sends;
Step 2, send chip selection signal and instruction with repeater for root node to the corresponding ports of subordinate equipment group;
Step 3, repeater command analysis module instruction is resolved and according to analysis result chip select;
Step 4, subordinate equipment group send the uplink module performing result to repeater by corresponding output port;
Step 5, repeater uplink module the execution result received is fed back to main control device.
In the present embodiment, in step 2, forward chip selection signal and instruction to the corresponding ports of subordinate equipment group with repeater for root node.
Concretely comprising the following steps of wherein step 3, parsing and chip select:
Step S1: in the command analysis module 21 of repeater 2 and subordinate equipment group 3, instruction is resolved by each standard from the command analysis module 21 of equipment;
Step S2: compared with the instruction set preset by instruction analysis result, certain standard in the repeater 2 selecting to comprise this instruction analysis result in instruction set or subordinate equipment group 3 is from equipment.
Such as main control device 1 sends instruction a0 to repeater 2, repeater 2 forwards a0 to each standard in subordinate equipment group 3 from MOSI port corresponding to equipment, repeater 2 and in subordinate equipment group 3 each standard respectively instruction a0 is resolved from the command analysis module 21 of equipment.Resolving is:
If the instruction set that repeater 2 is preset b0, b1 ... bn} comprises instruction a0, then drags down the chip selection signal of repeater;If the instruction set that in subordinate equipment group 3, certain standard is preset from equipment c0, c1 ..., cn} comprises instruction a0, then drags down this standard chip selection signal from equipment.
Wherein step 5, uplink module 22 is one or logic circuit.Refer to the uplink module schematic diagram that Fig. 5, Fig. 5 are embodiment two.As it is shown in figure 5, uplink module 22 is or logic circuit in this embodiment.Subordinate equipment group 3 send execution result and repeater 2 self execution result through logic circuit phase or after export to main control device 1.
Simultaneously in the present invention, the system that system forms or embodiment two the discloses composition no matter embodiment one discloses, a tree topology can be formed.Refer to the topological structure schematic diagram that Fig. 6, Fig. 6 are a kind of network trunk system based on SPI protocol.As shown in Figure 6, after main control device 1, repeater 2 and subordinate equipment group 3 form a tree topology, wherein in subordinate equipment group 3 any one standard from equipment such as standard from equipment 1.2(5) can be substituted by the combination 4 of repeater and subordinate equipment group.When repeater adopts broadcast mode to send chip selection signal and instruction to subordinate equipment group 3, its instruction analyzing step, chip select principle and data output principle are with embodiment one;When repeater adopts forward mode to send chip selection signal and instruction to subordinate equipment group, its instruction analyzing step, chip select principle and data output principle are with embodiment two.
Last it is noted that embodiment of above is only in order to illustrate technical scheme, it is not intended to limit;Although the present invention being described in detail with reference to aforementioned embodiments, it will be understood by those within the art that: the technical scheme described in aforementioned each embodiment still can be modified by it, or wherein portion of techniques feature is carried out equivalent replacement;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the present invention.

Claims (10)

1. based on a network trunk system of SPI, including main control device, repeater and subordinate equipment group, it is characterised in that:
Described repeater includes command analysis module and uplink module;
Described subordinate equipment group at least includes a standard from equipment;
Described main control device and repeater are observed SPI communications protocol and are electrically connected;
Described repeater and subordinate equipment group are observed SPI communications protocol and are electrically connected.
2. a kind of network trunk system based on SPI protocol according to claim 1, the SCLK signal line in described SPI communications protocol, MOSI holding wire forms the first bus, it is characterised in that:
The input 1 of the command analysis module of described repeater is connected with the CS signal input part of repeater, input 2 is connected with the first bus input end of repeater, outfan 1 is connected with the CS signal output part of repeater, outfan 2 is connected with the first output end of main of repeater, and outfan 3 is connected with the input 2 of uplink module;
The input 1 of described uplink module is connected with the MISO signal input part of repeater, the outfan 3 of input 2 link order parsing module, and outfan is connected with the MISO signal output part of repeater.
3. a kind of network trunk system based on SPI protocol according to claim 2, it is characterised in that the uplink module of described repeater is MUX.
4. a kind of network trunk system based on SPI protocol according to claim 1, described SPI communication
SCLK signal line in agreement, CS holding wire and MOSI holding wire form the second bus, it is characterised in that:
The input of the command analysis module of described repeater is connected with the second bus input end of repeater, and outfan is connected with the second output end of main of repeater;
The input of the uplink module of described repeater is connected with the MISO signal input part of repeater, and outfan is connected with the MISO signal output part of repeater.
5. a kind of network trunk system based on SPI protocol according to claim 4, it is characterised in that each standard in described subordinate equipment group includes command analysis module from equipment:
Each standard connects the second bus input end of this equipment from the input of the command analysis module of equipment, and outfan connects the second output end of main of this equipment.
6. a kind of network trunk system based on SPI protocol according to claim 4, it is characterised in that the uplink module of described repeater is or logic circuit.
7. the method for work based on the network trunk system of SPI protocol, it is characterised in that described method of work comprises the following steps:
Step one, described repeater receive chip selection signal and the instruction that described main control device sends;
Step 2, send chip selection signal and instruction with described repeater for root node to the corresponding ports of described subordinate equipment group;
Step 3, described repeater command analysis module instruction is carried out and according to analysis result chip select;
Step 4, described subordinate equipment group send the uplink module performing result to repeater by corresponding output port;
Step 5, described repeater uplink module the execution result received is fed back to main control device.
8. method according to claim 7, it is characterised in that:
In described step 2, with described repeater for root node to the corresponding ports broadcast transmission chip selection signal of described subordinate equipment group and instruction;
In described step 3, concretely comprising the following steps of described parsing and chip select:
Step S1: the command analysis module of described repeater parses the address code of instruction, and by each standard in this address code broadcast transmission to described subordinate equipment group from MOSI input port corresponding to equipment;
Step S2: the address code received compared with the address code preset, selects in the described repeater identical with the address code received or described subordinate equipment group certain standard from equipment;
In described step 5, described uplink module is MUX, and described MUX selects certain standard in described repeater or described subordinate equipment group to feed back to main control device from the execution result of equipment according to the address code that command analysis module sends.
9. method according to claim 7, it is characterised in that:
In described step 2, forward chip selection signal and instruction for root node to described subordinate equipment group with described repeater;
In described step 3, concretely comprising the following steps of described parsing and chip select:
Step S1: in the command analysis module of described repeater and described subordinate equipment group, described instruction is resolved by each standard from the command analysis module of equipment;
Step S2: compared with the instruction set preset by instruction analysis result, certain standard in the repeater selecting to comprise this instruction analysis result in instruction set or subordinate equipment group is from equipment;
In described step 5, described uplink module is or logic circuit.
10. a kind of sheet screening device comprising repeater according to claim 1, it is characterized in that, described repeater and described subordinate equipment group can also form tree topology, and in described subordinate chipset, any one standard can by the combination replacement of repeater and subordinate equipment group from equipment.
CN201610052316.4A 2016-01-26 2016-01-26 SPI (serial peripheral interface) protocol based network relay system and operation method thereof Pending CN105719469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610052316.4A CN105719469A (en) 2016-01-26 2016-01-26 SPI (serial peripheral interface) protocol based network relay system and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610052316.4A CN105719469A (en) 2016-01-26 2016-01-26 SPI (serial peripheral interface) protocol based network relay system and operation method thereof

Publications (1)

Publication Number Publication Date
CN105719469A true CN105719469A (en) 2016-06-29

Family

ID=56154994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610052316.4A Pending CN105719469A (en) 2016-01-26 2016-01-26 SPI (serial peripheral interface) protocol based network relay system and operation method thereof

Country Status (1)

Country Link
CN (1) CN105719469A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582823A (en) * 2008-05-13 2009-11-18 深圳迈瑞生物医疗电子股份有限公司 Communicated method, communication system and communication routing device based on SPI bus
CN104573649A (en) * 2014-12-30 2015-04-29 深圳市汇顶科技股份有限公司 Fingerprint recognition sensor and terminal equipment
CN104881382A (en) * 2015-06-15 2015-09-02 刘晓辉 Master and slave equipment connection device and address recognition method thereof
CN204808315U (en) * 2015-07-23 2015-11-25 绵阳灵通电讯设备有限公司 System based on inter -plate communication is realized to SPI serial peripheral hardware interface protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582823A (en) * 2008-05-13 2009-11-18 深圳迈瑞生物医疗电子股份有限公司 Communicated method, communication system and communication routing device based on SPI bus
CN104573649A (en) * 2014-12-30 2015-04-29 深圳市汇顶科技股份有限公司 Fingerprint recognition sensor and terminal equipment
CN104881382A (en) * 2015-06-15 2015-09-02 刘晓辉 Master and slave equipment connection device and address recognition method thereof
CN204808315U (en) * 2015-07-23 2015-11-25 绵阳灵通电讯设备有限公司 System based on inter -plate communication is realized to SPI serial peripheral hardware interface protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石峰,刘桂艳: ""一种廉价的实现多机通讯的通讯变换器"", 《电子技术应用》 *

Similar Documents

Publication Publication Date Title
CN109962847B (en) Method and device for encapsulating service function chain message and computer readable storage medium
US10198396B2 (en) Master control board that switches transmission channel to local commissioning serial port of the master control board
CN103034602B (en) A kind of content search chip based on peripheral component interconnect bus and system
CN113612654B (en) Vehicle-mounted gateway function test method based on database
US20130332634A1 (en) Tunnel suitable for multi-segment communication links and method therefor
CN105446930A (en) Single selection end SPI (Serial Peripheral Interface) master-slave multi-machine bidirectional communication method
CN115065637B (en) Method and device for transmitting computing power resource information and electronic equipment
CN105786736A (en) Method, chip and device for multi-chip cascading
CN105260260A (en) SPI data transmission device with data check function and data check method
CN105677605A (en) Highly-efficient interconnected system capable of configuring chips and realization system thereof and device
CN106899327A (en) The method and apparatus of data transfer
CN105243039A (en) Serial port communication system and method
CN110502799B (en) Automatic configuration method and device for chip pins
CN104639400A (en) Automatic detection method and device of network packet processing chip
CN109995548B (en) Device management method and system, data transmission method and system and terminal device
CN203706058U (en) CAN bus based multi-I/O board card expansion structure
US8521943B2 (en) Data transmission system and method of reading data
CN115663549B (en) Multi-interface conversion device and vehicle
CN105719469A (en) SPI (serial peripheral interface) protocol based network relay system and operation method thereof
CN115134427B (en) Communication protocol coordination method, device, computer equipment and storage medium
CN107769960B (en) BMC management architecture based on CAN bus
CN106856454A (en) A kind of method of message forwarding, equipment and system
CN102841875A (en) Host computer with intelligent bus interface and security system
CN111142438A (en) Cloud platform connection port control device and control method
CN209787473U (en) system for seamless switching multiple wireless transmission modes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160629