CN107918593A - The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end - Google Patents
The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end Download PDFInfo
- Publication number
- CN107918593A CN107918593A CN201710341553.7A CN201710341553A CN107918593A CN 107918593 A CN107918593 A CN 107918593A CN 201710341553 A CN201710341553 A CN 201710341553A CN 107918593 A CN107918593 A CN 107918593A
- Authority
- CN
- China
- Prior art keywords
- external equipment
- controller
- communication
- shift register
- incorporated
- 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.)
- Granted
Links
- 230000006854 communication Effects 0.000 title claims abstract description 63
- 238000004891 communication Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 claims abstract description 5
- 230000005540 biological transmission Effects 0.000 claims 1
- 230000002093 peripheral effect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000005611 electricity Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0002—Serial port, e.g. RS232C
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)
- Communication Control (AREA)
Abstract
The present invention relates to digital circuit and bussing technique field, more particularly to the expansion interface circuit and communication means of a kind of one-to-many universal serial bus of near-end, including putting controller and external equipment in host, controller extends out 6 line end mouths, respectively VCC, GND, RX, TX, CS and OL, the decoding output terminal of decoder is connected with the CS ports of external equipment, go here and there out shift register with being incorporated to and be connected in the OL ends of external equipment, it is incorporated to and goes here and there out shift register access controller, the OL ends of external equipment are pulled down to GND, it is incorporated to and goes here and there out the parallel input terminal of shift register and connect and move high level to;The present invention is not on the premise of RS485 buses are increased, realize the one-to-many two-way communication of near-end serial communication, and the hot plug of peripheral hardware is supported in communication process, can flexibly change according to demand in actual use, other bus mastering modes can be expanded out according to basic communication mode.
Description
Technical field
The present invention relates to digital circuit and bussing technique field, and in particular to a kind of expansion of the one-to-many universal serial bus of near-end
Interface circuit and communication means.
Background technology
Serial bus communication is common mode in microcontroller use, but due to the limitation of its own characteristic, monolithic
The UART communications that machine carries can only often realize a pair of of serial commu-nication, can not realize one-to-many communication mode.Existing string
The one-to-many technology of row communication carries out expansion realization using RS485 buses, and it is one-to-many that RS485 buses are suitable for the distal end such as industry spot
The occasion of communication, is often wasted one's talent on a petty job using RS485 for near-end communication, has both caused to waste, also taken additional space.Separately
Outside, the one-to-many communication technology of existing near-end does not often support hot plug, such as IIC communications etc., if needing in use
Removing device, often causes bus communication mistake so as to influence the communication of the overall situation.So set for the modularization of one master and multiple slaves
For standby, the ease for use of equipment can be greatly improved with the interface of hot plug also compatible serial communication at the same time.
The content of the invention
In order to solve the above-mentioned technical problem the deficiency in, it is an object of the invention to:It is one-to-many serial to provide a kind of near-end
The expansion interface circuit and communication means of bus, both can realize serial communication on the premise of RS485 buses are not increased
One-to-many two-way communication, and support hot plug.
The present invention is that technical solution is used by solving its technical problem:
The expansion interface circuit of the one-to-many universal serial bus of near-end, including put controller in host and external set
Standby, controller extends out 6 line end mouths, is respectively VCC, GND, RX, TX, CS and OL, and the serial communication emission port TX of controller is straight
Connect and be connected with the serial communication receiving port RX of multiple external equipments, the external multiselects of serial communication receiving port RX of controller
One analog switch, one analog switch of multiselect are also connected with the serial communication emission port TX of external equipment respectively, controller
Digital output pin is connected with one analog switch of multiselect and decoder respectively, the decoding output terminal and external equipment of decoder
CS ports be connected, the OL ends of external equipment go here and there out shift register and are connected with being incorporated to, and are incorporated to and go here and there out shift register and connect
Enter controller, the OL ends of external equipment are pulled down to GND, are incorporated to and go here and there out the parallel input terminal of shift register and connect and move high electricity to
It is flat.
Further preferably, the OL ends of external equipment and the digital input pins of controller are connected directly.
Further preferably, the controller of host uses ATMEGA2560, and the controller of external equipment uses ATEMGA
The controller of 328P, host and slave carries out serial communication using UART0.
Using the communication means of the expansion interface circuit of the one-to-many universal serial bus of near-end, comprise the following steps:
A, controller read be incorporated to go here and there out shift register state or directly read the states of each external equipment OL ports,
Judge that there is equipment access in which port:Reading value has external equipment access for low level corresponding OL ports, and reading value is high electricity
Flat OL ports are accessed without equipment;
B, the information that the external equipment that controller is obtained according to step a accesses, digital output pin output counterlogic value,
Control one analog switch of multiselect to open the receiving channel of corresponding external equipment, and control decoder by the CS of corresponding external equipment
End is placed in high level, and external equipment reads CS ends and understands to be selected by piece, due to obtaining the access information of external equipment,
Not accessing the port of external equipment will directly skip;
C, controller carries out serial communication, if communication process with the corresponding external equipment selected by piece one by one since low level
Data transfer time-out, then skip current device and connected with next establish, led to one by one according to effective external equipment access order
Letter is until arrive a last external equipment.
Compared with prior art, the invention has the advantages that:
The present invention realizes the one-to-many two-way communication of near-end serial communication, greatly on the premise of RS485 buses are not increased
Ease for use of one host of near-end to communication with multiple slaves equipment is optimized greatly, operates more peripheral hardwares using less control port, greatly
Mcu resource is optimized greatly, and the hot plug of peripheral hardware is supported in communication process, can be clever according to demand in actual use
Change living, other bus mastering modes can be expanded out according to basic communication mode.
Brief description of the drawings
Fig. 1 circuit connecting relation schematic diagrames of the present invention;
Fig. 2 bus marco flow diagrams of the present invention;
Fig. 3 decoding schemes of the present invention;
Fig. 4 gating circuit figures of the present invention;
Fig. 5 present invention, which is incorporated to, goes here and there out the circuit diagram of shift register.
Embodiment
The embodiment of the present invention is described further below in conjunction with the accompanying drawings:
Embodiment 1
As shown in Figs. 1-2, the expansion interface circuit of the one-to-many universal serial bus of near-end of the present invention, including put in host
Controller, one analog switch of multiselect, decoder, be incorporated to and go here and there out shift register and external equipment, controller extends out 6 line ends
Mouthful, it is respectively VCC, GND, RX, TX, CS and OL.
The serial communication emission port TX of controller is directly connected with the serial communication receiving port RX of multiple external equipments
Connect, when controller sends information, multiple equipment can receive at the same time.
Multiple TX can not be accessed at the same time for the RX ends of UART serial communications, then need design gated fashion to carry out timesharing and connect
By.External one analog switches of multiselect of serial communication receiving port RX of controller, one analog switch of multiselect are also set with external respectively
Standby serial communication emission port TX is connected.
The digital output pin of controller is connected with one analog switch of multiselect and decoder respectively, and controller is by changing
The output logical value for becoming digital output pin controls the passage of gating and selected external equipment.So design is in some need
Under the occasion for receiving external equipment, external equipment can directly be activated by chip select line and send data to master controller, saved
Master controller sends the time of request data.
The decoding output terminal of decoder is connected with the CS ports of external equipment, is high level when external equipment reads CS ends
When, then external equipment is strobed, its serial communication emission port TX is connected with the RX ends of controller.
In order to realize the hot plug of external equipment, controller will obtain the access situation of external equipment, external equipment in real time
OL ends go here and there out shift register with being incorporated to and be connected, be incorporated to and go here and there out shift register access controller, the OL ends of external equipment
GND is pulled down to, is incorporated to and is gone here and there out the parallel input terminal of shift register and connect and move high level to.When external equipment does not access, and
It is high level that the shift register that enters to go here and there out, which reads external equipment OL logical values, when external equipment accesses, is incorporated to and goes here and there out displacement
The parallel input terminal of register is pulled down, and it is low level to read corresponding OL ends.If controller pin resource is abundant, will directly can set
The digital input pins of standby OL ends and controller are connected directly, for judging whether equipment accesses.
Using the communication means of the expansion interface circuit of the one-to-many universal serial bus of near-end, comprise the following steps:
A, controller read be incorporated to go here and there out shift register state or directly read the states of each external equipment OL ports,
Judge that there is equipment access in which port:Reading value has external equipment access for low level corresponding OL ports, and reading value is high electricity
Flat OL ports are accessed without equipment;
B, the information that the external equipment that controller is obtained according to step a accesses, digital output pin output counterlogic value,
Control one analog switch of multiselect to open the receiving channel of corresponding external equipment, and control decoder by the CS of corresponding external equipment
End is placed in high level, and external equipment reads CS ends and understands to be selected by piece, due to obtaining the access information of external equipment,
Not accessing the port of external equipment will directly skip;
C, controller carries out serial communication, if communication process with the corresponding external equipment selected by piece one by one since low level
Data transfer time-out, then skip current device and connected with next establish, led to one by one according to effective external equipment access order
Letter is until arrive a last external equipment.
Embodiment 2
As in Figure 3-5, the controller of host uses ATMEGA2560, and the controller of external equipment uses ATEMGA
The controller of 328P, host and slave carries out serial communication using UART0, designs 8 slave circuits, and decoder selection 3-8 is translated
Code device chip 74HC138, gate it and use 74HC4051, be incorporated to go here and there out shift register select 74HC165.
Decoding circuit:Using ATEMGA2560 tri- pins of PL0, PL1, PL2 as decoder and gate control
Pin, its network name are SEL_A, SEL_B, SEL_C.SEL_0-7 is respectively the CS ports of eight external equipments, is selected for piece
External equipment.
PG0, PG1 using ATEMGA2560 go here and there out the control terminal of shift register as being incorporated to, and PD7 goes here and there out as being incorporated to
The receiving terminal of shift register data.Network name be respectively ONLINE_CLK, ONLINE_LOCK, ONILNE_DATA,
ONLINE_0-7 is respectively the OL ports of eight peripheral hardwares, and when setting external standby access, OL pins drag down.
The interface form of external equipment is flexible, can use the compact 6PIN interfaces such as XH2.0, RJ12 or other required
6PIN interface forms.
The decoding circuit of gating circuit and Fig. 3 have common address wire, and when address, line traffic control decoder has gated external set
When standby, gating circuit also opens the passage of corresponding gating device, gates and communicates for serial ports.
The communication means of interface circuit is exemplified below:
The interface index of eight external equipments is 0-7 respectively, if only there are equipment access, other ports in port 0,1,4,7
During no external equipment access, system brings into operation.
A, the controller of host reads to be incorporated to and goes here and there out the binary value of shift register (present case uses low for 00110110
Position formerly, can replace designing scheme according to demand and realize uimsbf unsigned integer most significant bit first), then in this communication cycle, master controller is only with 0,1,4,7
Number port communication;
B, the gating signal output 000 of the controller of host, gates No. 0 channel conductive, decoder chooses No. 0 equipment;
C, the controller of host and No. 0 equipment communication.
Repeat step b-c complete with the communication of 1,4,7 external equipments, after the completion of perform step a.If in this communication cycle
Then in repeat steps a after completing the communication in this cycle, the value for reading shift register is 00100110 for No. 3 equipment accesses,
Then next communication cycle host rotation visit 0,1,3,4, No. 7 equipment.
By above-mentioned circuit theory and control method, the one-to-many hot-swappable universal serial bus of 8 peripheral hardware near-ends is realized, it is real
It can flexibly change according to demand in the use of border, operate more peripheral hardwares using less control port, greatly optimize microcontroller
Resource.
Claims (4)
1. a kind of expansion interface circuit of the one-to-many universal serial bus of near-end, including the controller that is arranged in host and external set
It is standby, it is characterised in that controller extends out 6 line end mouths, is respectively VCC, GND, RX, TX, CS and OL, and the serial communication of controller is sent out
Penetrate port TX directly with the serial communication receiving port RX of multiple external equipments to be connected, the serial communication receiving port of controller
External one analog switches of multiselect of RX, one analog switch of multiselect are also connected with the serial communication emission port TX of external equipment respectively
Connect, the digital output pin of controller is connected with one analog switch of multiselect and decoder respectively, the decoding output of decoder
End is connected with the CS ports of external equipment, and the OL ends of external equipment go here and there out shift register and be connected with being incorporated to, and are incorporated to and go here and there out
Shift register access controller, the OL ends of external equipment are pulled down to GND, are incorporated to and go here and there out the parallel input terminal of shift register and connect
It is pulled upward to high level.
2. the expansion interface circuit of the one-to-many universal serial bus of near-end according to claim 1, it is characterised in that external equipment
OL ends and the digital input pins of controller be connected directly.
3. the expansion interface circuit of the one-to-many universal serial bus of near-end according to claim 1, it is characterised in that the control of host
Device processed uses ATMEGA2560, and the controller of external equipment uses ATEMGA 328P, and the controller of host and slave uses
UART0 carries out serial communication.
A kind of 4. communication party of expansion interface circuit using the one-to-many universal serial bus of claim 1-3 any one of them near-ends
Method, it is characterised in that comprise the following steps:
A, controller read be incorporated to go here and there out shift register state or directly read the states of each external equipment OL ports, judge
There is equipment access in which port:Reading value has external equipment access for low level corresponding OL ports, and reading value is high level
OL ports are accessed without equipment;
B, the information that the external equipment that controller is obtained according to step a accesses, digital output pin output counterlogic value, control
One analog switch of multiselect opens the receiving channel of corresponding external equipment, and controls decoder to put the CS ends of corresponding external equipment
In high level, external equipment reads CS ends and understands to be selected by piece, due to obtaining the access information of external equipment, does not connect
Entering the port of external equipment will directly skip;
C, controller carries out serial communication, if communication procedure data with the corresponding external equipment selected by piece one by one since low level
Transmission time-out, then skip current device and connected with next establish, communication is straight one by one according to effective external equipment access order
Extremely arrive a last external equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710341553.7A CN107918593B (en) | 2017-05-16 | 2017-05-16 | Expansion interface circuit of near-end one-to-many serial bus and communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710341553.7A CN107918593B (en) | 2017-05-16 | 2017-05-16 | Expansion interface circuit of near-end one-to-many serial bus and communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107918593A true CN107918593A (en) | 2018-04-17 |
CN107918593B CN107918593B (en) | 2024-05-24 |
Family
ID=61898571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710341553.7A Active CN107918593B (en) | 2017-05-16 | 2017-05-16 | Expansion interface circuit of near-end one-to-many serial bus and communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107918593B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213040A (en) * | 2018-09-11 | 2019-01-15 | 深圳市英威腾电气股份有限公司 | Control circuit, electronic equipment and its control method |
CN113968353A (en) * | 2020-07-22 | 2022-01-25 | 海鹰航空通用装备有限责任公司 | Unmanned aerial vehicle swarm launching control system and method |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DD266689A1 (en) * | 1987-12-18 | 1989-04-05 | Krocker Siegmar Dipl Ing | CIRCUIT ARRANGEMENT FOR STRENGTHENING A SERIAL DATA GROUP |
CN1619517A (en) * | 2003-11-22 | 2005-05-25 | 鸿富锦精密工业(深圳)有限公司 | Multichannel internal integrated circuit |
CN2704848Y (en) * | 2004-03-07 | 2005-06-15 | 汤元信 | Safety controlling electric energy meter for multi-users in apartments |
CN1680930A (en) * | 2004-02-19 | 2005-10-12 | 三星电子株式会社 | System and controller with reduced bus utilization time |
US20060112202A1 (en) * | 2004-11-19 | 2006-05-25 | Jaishankar Thayyoor | Serial bit ordering of non-synchronous bus signals |
CN101303680A (en) * | 2008-06-17 | 2008-11-12 | 深圳市宏电技术股份有限公司 | Method and apparatus for expanding multiple serial ports of terminal |
CN201955776U (en) * | 2010-12-24 | 2011-08-31 | 福州大学 | Novel I/O (input/output) bus |
CN103607207A (en) * | 2013-11-11 | 2014-02-26 | 大连理工大学 | Plug-and-play multi-interface data compression apparatus |
CN104794093A (en) * | 2015-03-31 | 2015-07-22 | 南通艾利特自动化有限公司 | SPI bus expander circuit with ID recognition function |
CN106021152A (en) * | 2016-05-12 | 2016-10-12 | 柳州桂通科技股份有限公司 | Master-slave serial device concentrator and asynchronous duplex one-to-many serial communication method |
CN206726210U (en) * | 2017-05-16 | 2017-12-08 | 烟台市迈高机器人科技有限公司 | The expansion interface circuit of the one-to-many universal serial bus of near-end |
-
2017
- 2017-05-16 CN CN201710341553.7A patent/CN107918593B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DD266689A1 (en) * | 1987-12-18 | 1989-04-05 | Krocker Siegmar Dipl Ing | CIRCUIT ARRANGEMENT FOR STRENGTHENING A SERIAL DATA GROUP |
CN1619517A (en) * | 2003-11-22 | 2005-05-25 | 鸿富锦精密工业(深圳)有限公司 | Multichannel internal integrated circuit |
CN1680930A (en) * | 2004-02-19 | 2005-10-12 | 三星电子株式会社 | System and controller with reduced bus utilization time |
CN2704848Y (en) * | 2004-03-07 | 2005-06-15 | 汤元信 | Safety controlling electric energy meter for multi-users in apartments |
US20060112202A1 (en) * | 2004-11-19 | 2006-05-25 | Jaishankar Thayyoor | Serial bit ordering of non-synchronous bus signals |
CN101303680A (en) * | 2008-06-17 | 2008-11-12 | 深圳市宏电技术股份有限公司 | Method and apparatus for expanding multiple serial ports of terminal |
CN201955776U (en) * | 2010-12-24 | 2011-08-31 | 福州大学 | Novel I/O (input/output) bus |
CN103607207A (en) * | 2013-11-11 | 2014-02-26 | 大连理工大学 | Plug-and-play multi-interface data compression apparatus |
CN104794093A (en) * | 2015-03-31 | 2015-07-22 | 南通艾利特自动化有限公司 | SPI bus expander circuit with ID recognition function |
CN106021152A (en) * | 2016-05-12 | 2016-10-12 | 柳州桂通科技股份有限公司 | Master-slave serial device concentrator and asynchronous duplex one-to-many serial communication method |
CN206726210U (en) * | 2017-05-16 | 2017-12-08 | 烟台市迈高机器人科技有限公司 | The expansion interface circuit of the one-to-many universal serial bus of near-end |
Non-Patent Citations (1)
Title |
---|
严宇;黄建国;曾浩;: "基于SPI协议的新型高速ADC芯片配置", 信息与电子工程, vol. 7, no. 05, 25 October 2009 (2009-10-25), pages 453 - 458 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213040A (en) * | 2018-09-11 | 2019-01-15 | 深圳市英威腾电气股份有限公司 | Control circuit, electronic equipment and its control method |
CN109213040B (en) * | 2018-09-11 | 2021-06-15 | 深圳市英威腾电气股份有限公司 | Control circuit, electronic device and control method thereof |
CN113968353A (en) * | 2020-07-22 | 2022-01-25 | 海鹰航空通用装备有限责任公司 | Unmanned aerial vehicle swarm launching control system and method |
Also Published As
Publication number | Publication date |
---|---|
CN107918593B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105785958B (en) | Multi-functional data collector, acquisition system and method based on wisdom factory | |
CN101329663B (en) | Apparatus and method for implementing pin time-sharing multiplexing | |
CN101477504B (en) | System and method for transmission of data | |
CN206726210U (en) | The expansion interface circuit of the one-to-many universal serial bus of near-end | |
CN104484301B (en) | A kind of IO bus units based on FPGA with self-recognition function | |
CN102262604B (en) | Concurrent access method, system and interface device | |
CN101140556A (en) | Method and device for realizing accessing multiple I2C slave device by programmable device | |
CN105205025A (en) | Chip interconnection method, chips and device | |
CN107943730A (en) | A kind of system for supporting NVMe agreement PCIE signals | |
CN101414291A (en) | Master-salve distributed system and parallel communication method applying the same | |
CN102193888B (en) | Data transmission system and programmable serial peripheral interface controller | |
CN100478935C (en) | PCIE channel expansion device, system and its collocation method | |
CN107918593A (en) | The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end | |
CN114328318B (en) | DMA controller for direct equipment interconnection for microcontroller and interconnection control method | |
CN106874228A (en) | Based on I2Communication means between the controller and communication means, multi-controller of C buses | |
CN113791997A (en) | Method for solving compatibility and adaptation of different chip pins | |
CN113626359A (en) | Signal switching device and method for flash memory chip of server | |
CN110554881A (en) | Switching chip working mode remote switching system and method based on CPLD | |
CN105955919A (en) | Implementation method of reading-writing NANDFlash by multiple MCUs based on FPGA (Field Programmable Gate Array) | |
CN102693203A (en) | Embedded USB (universal serial bus) host | |
CN106815163B (en) | Have the System on Chip/SoC and its PCI-E root port controller of warm connection function | |
CN102591817B (en) | Multi-bus bridge controller and implementing method thereof | |
CN102316177B (en) | Address resolution method, system thereof and address resolution device | |
CN107239423A (en) | A kind of device based on extension IIC interfaces | |
CN104133792A (en) | RSB communication method and RSB communication system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |