CN206726210U - The expansion interface circuit of the one-to-many universal serial bus of near-end - Google Patents

The expansion interface circuit of the one-to-many universal serial bus of near-end Download PDF

Info

Publication number
CN206726210U
CN206726210U CN201720536668.7U CN201720536668U CN206726210U CN 206726210 U CN206726210 U CN 206726210U CN 201720536668 U CN201720536668 U CN 201720536668U CN 206726210 U CN206726210 U CN 206726210U
Authority
CN
China
Prior art keywords
controller
external equipment
shift register
incorporated
serial communication
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.)
Expired - Fee Related
Application number
CN201720536668.7U
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.)
Yantai Maigao Robot Technology Co Ltd
Original Assignee
Yantai Maigao Robot Technology 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 Yantai Maigao Robot Technology Co Ltd filed Critical Yantai Maigao Robot Technology Co Ltd
Priority to CN201720536668.7U priority Critical patent/CN206726210U/en
Application granted granted Critical
Publication of CN206726210U publication Critical patent/CN206726210U/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

It the utility model is related to digital circuit and bussing technique field, more particularly to a kind of expansion interface circuit of the one-to-many universal serial bus of near-end, including putting controller and external equipment in main frame, controller extends out 6 line end mouths, respectively VCC, GND, RX, TX, CS and OL, the decoding output end 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 utility model 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

The expansion interface circuit of the one-to-many universal serial bus of near-end
Technical field
It the utility model is related to digital circuit and bussing technique field, and in particular to a kind of one-to-many universal serial bus of near-end Expand interface circuit.
Background technology
Serial bus communication is common mode in single-chip microcomputer use, but due to the limitation of its own characteristic, monolithic The UART communications that machine carries can only often realize a pair of serial commu-nications, 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 applied to the distal end such as industry spot The occasion of communication, often wasted one's talent on a petty job using RS485 for near-end communication, 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 cause 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 simultaneously.
Utility model content
In order to solve the above-mentioned technical problem the deficiency in, the purpose of this utility model are:It is one-to-many to provide a kind of near-end The expansion interface circuit of universal serial bus, the one-to-many double of serial communication can be both realized on the premise of RS485 buses are not increased To communication, and support hot plug.
The utility model is that technical scheme 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 main frame and external set Standby, controller extends out 6 line end mouths, 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, the analog switch of multiselect one are also connected with the serial communication emission port TX of external equipment respectively, controller Digital output pin is connected with the analog switch of multiselect one and decoder respectively, the decoding output end and external equipment of decoder CS ports be connected, the OL ends of external equipment are gone 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 joined directly together.
Further preferably, the controller of main frame uses ATMEGA2560, and the controller of external equipment uses ATEMGA The controller of 328P, main frame 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 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 obtains according to step a accesses, digital output pin output counterlogic value, Control multiselect one analog switch open corresponding to external equipment receiving channel, and control decoder will corresponding external equipment CS 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 utility model has the advantages that:
The utility model realizes the one-to-many two-way of near-end serial communication on the premise of RS485 buses are not increased Letter, greatly optimizes ease for use of the main frame of near-end one to communication with multiple slaves equipment, is operated using less control port more outer If greatly optimizing mcu resource, and the hot plug of peripheral hardware is supported in communication process, can be according to need in actual use Flexible change is asked, other bus mastering modes can be expanded out according to basic communication mode.
Brief description of the drawings
Fig. 1 the utility model circuit connecting relation schematic diagrames;
Fig. 2 the utility model bus marco schematic flow sheets;
Fig. 3 the utility model decoding schemes;
Fig. 4 the utility model gating circuit figures;
Fig. 5 the utility model, which is incorporated to, goes here and there out the circuit diagram of shift register.
Embodiment
The utility model embodiment is described further below in conjunction with the accompanying drawings:
Embodiment 1
As shown in Figure 1-2, the expansion interface circuit of the one-to-many universal serial bus of near-end described in the utility model, including put in master Controller, the analog switch of multiselect one, decoder in machine, it is incorporated to and goes here and there out shift register and external equipment, controller extends out 6 lines Port, 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 simultaneously.
Multiple TX can not be accessed simultaneously for the RX ends of UART serial communications, then need design gated fashion to carry out timesharing and connect By.The external analog switches of multiselect one of serial communication receiving port RX of controller, the analog switch of multiselect one are also set with external respectively Standby serial communication emission port TX is connected.
The digital output pin of controller is connected with the analog switch of multiselect one 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 end 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, and 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 joined directly together, 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 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 obtains according to step a accesses, digital output pin output counterlogic value, Control multiselect one analog switch open corresponding to external equipment receiving channel, and control decoder will corresponding external equipment CS 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 main frame uses ATMEGA2560, and the controller of external equipment uses ATEMGA The controller of 328P, main frame 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 shape of external equipment is flexible, can use the compact 6PIN interfaces such as XH2.0, RJ12 or other required 6PIN interface shapes.
Gating circuit and Fig. 3 decoding circuit 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 When being accessed without external equipment, system brings into operation.
A, the controller of main frame 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 change design 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 main frame, gates No. 0 channel conductive, decoder chooses No. 0 equipment;
C, the controller of main frame 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 main frame 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 single-chip microcomputer Resource.

Claims (3)

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 main frame and external set It is standby, it is characterised in that controller extends out 6 line end mouths, respectively VCC, GND, RX, TX, CS and OL, the serial communication hair of controller 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 The external analog switches of multiselect one of RX, the analog switch of multiselect one are also connected with the serial communication emission port TX of external equipment respectively Connect, the digital output pin of controller is connected with the analog switch of multiselect one 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 are gone 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 joined directly together.
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 main frame Device processed uses ATMEGA2560, and the controller of external equipment uses ATEMGA 328P, and the controller of main frame and slave uses UART0 carries out serial communication.
CN201720536668.7U 2017-05-16 2017-05-16 The expansion interface circuit of the one-to-many universal serial bus of near-end Expired - Fee Related CN206726210U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201720536668.7U CN206726210U (en) 2017-05-16 2017-05-16 The expansion interface circuit of the one-to-many universal serial bus of near-end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201720536668.7U CN206726210U (en) 2017-05-16 2017-05-16 The expansion interface circuit of the one-to-many universal serial bus of near-end

Publications (1)

Publication Number Publication Date
CN206726210U true CN206726210U (en) 2017-12-08

Family

ID=60513427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201720536668.7U Expired - Fee Related CN206726210U (en) 2017-05-16 2017-05-16 The expansion interface circuit of the one-to-many universal serial bus of near-end

Country Status (1)

Country Link
CN (1) CN206726210U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107918593A (en) * 2017-05-16 2018-04-17 烟台市迈高机器人科技有限公司 The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end
CN111352879A (en) * 2018-12-24 2020-06-30 沈阳新松机器人自动化股份有限公司 Same-address slave machine expansion circuit and method based on multi-path gating
CN113219293A (en) * 2021-07-08 2021-08-06 深圳市爱图仕影像器材有限公司 Optical accessory detection circuit and lighting equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107918593A (en) * 2017-05-16 2018-04-17 烟台市迈高机器人科技有限公司 The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end
CN107918593B (en) * 2017-05-16 2024-05-24 烟台市迈高机器人科技有限公司 Expansion interface circuit of near-end one-to-many serial bus and communication method
CN111352879A (en) * 2018-12-24 2020-06-30 沈阳新松机器人自动化股份有限公司 Same-address slave machine expansion circuit and method based on multi-path gating
CN113219293A (en) * 2021-07-08 2021-08-06 深圳市爱图仕影像器材有限公司 Optical accessory detection circuit and lighting equipment

Similar Documents

Publication Publication Date Title
CN101477504B (en) System and method for transmission of data
CN101329663B (en) Apparatus and method for implementing pin time-sharing multiplexing
CN206726210U (en) The expansion interface circuit of the one-to-many universal serial bus of near-end
CN110221997A (en) A kind of USB interface-based versatile interface interconnecting device
CN102567280B (en) Computer hardware platform design method based on DSP (digital signal processor) and FPGA (field programmable gate array)
CN103454996A (en) Master-slave computer system and control method thereof
CN108255754B (en) A kind of I3C main equipment of compatible I2C, I3C master-slave equipment communication system and method
CN105205025A (en) Chip interconnection method, chips and device
CN101414291A (en) Master-salve distributed system and parallel communication method applying the same
CN107918593A (en) The expansion interface circuit and communication means of the one-to-many universal serial bus of near-end
CN101702119B (en) Device oriented programming technology and method
CN106874228A (en) Based on I2Communication means between the controller and communication means, multi-controller of C buses
CN110554881A (en) Switching chip working mode remote switching system and method based on CPLD
CN113791997A (en) Method for solving compatibility and adaptation of different chip pins
CN102693203A (en) Embedded USB (universal serial bus) host
CN109407574A (en) Output-controlling device and its method may be selected in a kind of multibus
CN113626359A (en) Signal switching device and method for flash memory chip of server
CN102708075A (en) Secure digital (SD) memory card hardware control device and control method
CN106815163B (en) Have the System on Chip/SoC and its PCI-E root port controller of warm connection function
CN102724090A (en) Process field bus (PROFIBUS) DP/PA integrated embedded slave node communication device based on DP controller with integrated 8031 core (DPC31)
CN205942681U (en) Serial communication interface that can dispose
CN109446144A (en) A kind of general purpose I 2C bus control unit for supporting User Agreement
CN100353718C (en) System and method for expanding I2C bus
CN201378316Y (en) Universal input/output interface extension circuit and mobile terminal with same
CN108153485A (en) A kind of more equipment collaborations access the method and system of SRAM

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171208

Termination date: 20180516