[go: up one dir, main page]

CN117472831B - A multi-MCU burning and serial port switching circuit, method and system - Google Patents

A multi-MCU burning and serial port switching circuit, method and system Download PDF

Info

Publication number
CN117472831B
CN117472831B CN202311285456.2A CN202311285456A CN117472831B CN 117472831 B CN117472831 B CN 117472831B CN 202311285456 A CN202311285456 A CN 202311285456A CN 117472831 B CN117472831 B CN 117472831B
Authority
CN
China
Prior art keywords
unit
mcu
input
port
switching circuit
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.)
Active
Application number
CN202311285456.2A
Other languages
Chinese (zh)
Other versions
CN117472831A (en
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.)
Joymed Technology (shanghai) Ltd
Original Assignee
Joymed Technology (shanghai) 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 Joymed Technology (shanghai) Ltd filed Critical Joymed Technology (shanghai) Ltd
Priority to CN202311285456.2A priority Critical patent/CN117472831B/en
Publication of CN117472831A publication Critical patent/CN117472831A/en
Application granted granted Critical
Publication of CN117472831B publication Critical patent/CN117472831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Electronic Switches (AREA)

Abstract

The invention discloses a multi-MCU burning and serial port switching circuit, a method and a system, relating to the technical field of electronic circuits, wherein the circuit comprises an input signal unit, a control signal unit, a switching circuit unit and an MCU unit, the control signal unit controls the input signal unit to input the signal of the switching circuit unit, the switching circuit unit transmits the received signal to the MCU unit, and the MCU is controlled to be in an effective or invalid state through control signal transmission. The method comprises the step of controlling only one channel to be effective in each stage of sub-unit through the control signal unit so as to realize the connection between the input signal unit and any MCU unit. The invention can expand the number of MCU according to the need, and the theoretical upper limit of the number is limited only by the driving capability of the input signal unit and the bandwidth of the line.

Description

Multi-MCU (micro control unit) programming and serial port switching circuit, method and system
Technical Field
The invention relates to the technical field of electronic circuits, in particular to a multi-MCU (micro control unit) programming and serial port switching circuit, method and system.
Background
In the prior art, a plurality of MCUs are often arranged in a circuit, so that a plurality of burning interfaces and debugging interfaces (such as serial ports) are designed on a printed circuit board, the number of devices on the circuit board is too large, space resources and cost are occupied, the number of the interfaces is too large, corresponding cables are increased, and the workload of developers is increased due to the back and forth switching of the interfaces.
Chinese patent publication No. CN114466254a discloses a serial port switching circuit, a switching method, a communication manager, and a communication system. The serial port switching circuit comprises an MCU, a switching circuit, a first serial port circuit with an RS485 serial port and a second serial port circuit with an RS232 serial port; the first serial circuit and the second serial circuit are respectively connected with the MCU, and the first serial circuit and the second serial circuit are also respectively connected with the switching circuit; the switching circuit is used for enabling the first serial circuit and disabling the second serial circuit or enabling the second serial circuit and disabling the first serial circuit according to the received control signal; when the switching circuit enables the first serial port circuit and disables the second serial port circuit, communication is established between the RS485 serial port and the MCU; when the switching circuit enables the second serial port circuit and disables the first serial port circuit, communication is established between the RS232 serial port and the MCU. The Chinese patent with publication number CN114281392A discloses a serial port upgrading method and system of a multi-MCU slave station, belonging to the technical field of MCU upgrading, wherein the method comprises the following steps: all MCU slave stations initialize to set the serial port analysis chip as read enable, and only after the upgrade frame of the corresponding slave station is obtained from the upper computer, the serial port analysis chip is set as write enable when the reply frame is sent, and the serial port analysis chip is reset as read enable immediately after the reply frame is sent, so that the buses multiplexed by a plurality of MCU slave stations can complete data receiving and transmitting without collision; specifically, after a single MCU slave station acquires complete upgrade files frame by frame, the MCU slave station copies the upgrade files to an application engineering storage area. Although both patents describe the arrangement of a serial port circuit, a switching circuit and an MCU, the circuit structure is complex, and the problems of space occupation, high cost and the like still exist.
Therefore, a programming and serial port switching circuit with multiple MCUs is needed to be designed, so that the problem that the number of MCUs is expanded in real time according to the needs can be solved, the cost is reduced, and the working efficiency is improved.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a multi-MCU programming and serial port switching circuit.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
the burning and serial port switching circuit of the multiple MCUs comprises an input signal unit, a control signal unit, a switching circuit unit and an MCU unit, wherein the control signal unit controls the input signal unit to input signals of the switching circuit unit, the switching circuit unit transmits the received signals to the MCU unit, and the MCU is controlled to be in an effective state or an ineffective state through control signal transmission.
Based on the above technical scheme, further, the input signal unit includes a plurality of input interfaces, and the burning signal and the serial port debugging signal are transmitted through the plurality of input interfaces.
Based on the above technical scheme, further, the writing signal includes a writing clock signal and a writing data signal, and the serial port debugging signal includes a serial port sending signal and a serial port receiving signal.
Based on the above technical scheme, further, the control signal unit comprises a plurality of control switches, one end of each control switch is connected with a power supply or grounded, and the other end of each control switch is connected with the switching circuit unit.
Based on the above technical scheme, further, the switching circuit unit is an analog switch, wherein the analog switch is an analog switch chip.
Based on the above technical scheme, further, when the analog switch is set to be one-stage, the analog switch is one in number, and is provided with a plurality of first input ports, second input ports, first output ports and second output ports, each first input port is connected with an input interface, the second input port is connected with a control signal unit, and the first output ports and the second output ports are connected with the MCU unit.
Based on the above technical scheme, when the analog switch is set to be multi-stage, the analog switch sets more than 2, the first stage is one analog switch, the second stage is two analog switches, the first input port of the analog switch of the second stage is connected with the first output port or the second output port of the analog switch of the first stage, the second input port of the second stage module switch is connected with the first output port or the second output port of the analog switch of the first stage, and the first output port and the second output port are connected with the MCU unit.
Based on the technical scheme, the MCU unit comprises a plurality of MCUs, and each output port of the analog switch of the last stage is correspondingly connected with one MCU; and the Nth stage uses 2 N-1 analog switches and 2 N-1 control switches to realize the burning and serial port communication of 2 N MCUs.
Based on the above technical scheme, further, the switching circuit unit is an analog switch circuit.
Based on the above technical scheme, further, the analog switch circuit includes a first input port, a second input port, a first output port and a second output port, one end of the first input port is connected with the input signal unit, the other end of the first input port is connected with the drain electrode of the first MOS tube and the drain electrode of the second MOS tube, the grid electrode of the first MOS tube is connected with the grid electrodes of the first resistor, the second resistor and the third MOS tube, the source electrode of the first MOS tube is connected with the drain electrode of the first resistor and the third MOS tube, and the source electrode of the third MOS tube is connected with the second output port; the second resistor is connected with the second input port and the grid electrode of the fourth MOS tube, the source electrode of the fourth MOS tube is grounded, and the drain electrode of the fourth MOS tube is connected with the third resistor; the grid electrode of the second MOS tube is connected with the grid electrodes of the fourth resistor, the third resistor and the fifth MOS tube, the source electrode of the second MOS tube is connected with the drain electrode of the fifth MOS tube and the fourth resistor, the source electrode of the fifth MOS tube is connected with the first output port, and the first output port and the second output port are connected with the MCU unit; the first input port is connected with the input signal unit, and the second input port is connected with the control signal unit.
The switching circuit unit comprises a multi-stage bidirectional double-channel subunit, wherein two channels of the final-stage subunit are respectively connected with one MCU unit; the method comprises the following steps: only one channel of each stage of subunit is controlled to be effective through the control signal unit so as to realize the connection between the input signal unit and any MCU unit.
Based on the above technical solution, the control signal unit sets a plurality of different control states, and under the different control states, each control switch included in the control signal unit is in any one of a high level state, a low level state and an arbitrary level state.
A multi-MCU burning and serial port switching system comprises a multi-MCU burning and serial port switching circuit.
Compared with the prior art, the invention has the following beneficial effects:
The invention provides a burning and serial port switching circuit of a plurality of MCUs; by setting up the multistage analog switch or adopting the multistage analog switch circuit, as long as 1 analog switch and 1 control switch are used to the first level, and 2 analog switches and 2 control switches are used to the second level. That is, the number of MCUs can be expanded as required, and the theoretical upper limit of the number is limited only by the driving capability of the input signal unit and the bandwidth of the line. The device can complete the functions of burning and serial port debugging of a plurality of MCUs only by using a single interface, reduces the number of devices on a circuit board, reduces the cost, reduces the workload of developers, is simple to operate and improves the working efficiency.
Drawings
FIG. 1 is a block flow diagram of a recording and serial port switching circuit according to the present invention;
FIG. 2 is a circuit diagram of an analog switch used in the burning and serial port switching circuit in embodiment 1 of the present invention;
Fig. 3 is a circuit diagram of an analog switch circuit used in the programming and serial port switching circuit in embodiment 2 of the present invention.
Detailed Description
The invention is further illustrated and described below with reference to the drawings and detailed description. The technical features of the embodiments of the invention can be combined correspondingly on the premise of no mutual conflict. In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to the appended drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The present invention may be embodied in many other forms than described herein and similarly modified by those skilled in the art without departing from the spirit of the invention, whereby the invention is not limited to the specific embodiments disclosed below. The technical features of the embodiments of the invention can be combined correspondingly on the premise of no mutual conflict.
In the description of the present invention, it will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or be indirectly connected with intervening elements present. In contrast, when an element is referred to as being "directly connected" to another element, there are no intervening elements present in the description of the present invention, it is to be understood that the terms "first" and "second" are used solely for the purpose of distinguishing between the descriptions and not necessarily for the purpose of indicating or implying a relative importance or implicitly for the order of the features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature.
Example 1
As shown in FIG. 1, the multi-MCU burning and serial port switching circuit comprises an input signal unit, a control signal unit, a switching circuit unit and an MCU unit, wherein the control signal unit controls the input signal unit to input signals of the switching circuit unit, the switching circuit unit transmits the received signals to the MCU unit, and the MCU is controlled to be in an effective state or an ineffective state through control signal transmission. Specifically, the input signal unit comprises a plurality of input interfaces, and the burning signal and the serial port debugging signal are transmitted through the plurality of input interfaces. The programming signal comprises a programming clock signal and a programming data signal, and the serial port debugging signal comprises a serial port sending signal and a serial port receiving signal. The control signal unit comprises a plurality of control switches, one end of each control switch is connected with a power supply or grounded, and the other end of each control switch is connected with the switching circuit unit.
In one embodiment, the switching circuit unit is an analog switch, wherein the analog switch is an analog switch chip. Specifically, as shown in fig. 2, the input interface includes SWC, SWD, UART _tx and uart_rx, where SWC is a recording clock signal, SWD is a recording data signal, uart_tx is a serial port transmitting signal, uart_rx is a serial port receiving signal, and an arrow of the input interface points to a signal transmission direction. U29, U30, U31 in fig. 2 are the same analog switches, SW1, SW2, and SW3 are 3 control switches in the control signal unit, and mcu_1, mcu_2, mcu_3, and mcu_4 represent 4 MCUs.
When the analog switch is set to be one-level, the analog switch is one-level, and is provided with a plurality of first input ports, second input ports, first output ports and second output ports, each first input port is connected with an input interface, the second input port is connected with a control signal unit, and the first output ports and the second output ports are connected with the MCU unit. D1, D2, D3 and D4 IN fig. 2 correspond to the first input port, the second input port, the first output port and the second output port respectively, IN1, IN2, IN3 and IN4 are 4 second input ports, S1A, S2A, S a and S4A are four first output ports, S1B, S2B, S B and S4B are four second output ports, and the first output port and the second output port are connected to one MCU respectively. And the analog switch also includes a ground port and a power port, such as GND, VDD, and the like.
Further, when the analog switch is set to be multi-stage, the analog switch is set to be more than 2, the first stage is one analog switch, the second stage is two analog switches, a first input port of the analog switch of the second stage is connected with a first output port or a second output port of the analog switch of the first stage, a second input port of the second stage module switch is connected with a first output port or a second output port of the analog switch of the first stage, and the first output port and the second output port are connected with the MCU unit. As shown in fig. 2, the first stage is provided with an analog switch U29, and the second stage is provided with two analog switches U30, U31; the MCU unit comprises a plurality of MCUs, and each output port of the analog switch of the last stage is correspondingly connected with one MCU; and the Nth stage uses 2 N-1 analog switches and 2 N-1 control switches to realize the burning and serial port communication of2 N MCUs. The circuit relies on the analog switches which are identical to U29, U30 and U31, and the principle is that: IN1 can control the switch of the trend of the D1 signal, when IN1 is IN a high level state, S1A and D1 are switched on, S1B and D1 are not switched on, and the signal is taken from S1A; when IN1 is IN a low state, S1B and DI are on, S1A and D1 are off, and the signals pass through S1B, D2, D3, D4.
Based on a multi-MCU programming and serial port switching circuit, a multi-MCU programming and serial port switching method is implemented, wherein the switching circuit unit comprises a multi-stage bidirectional double-channel subunit, and two channels of a final-stage subunit are respectively connected with one MCU unit; the method comprises the following steps: only one channel of each stage of subunit is controlled to be effective through the control signal unit so as to realize the connection between the input signal unit and any MCU unit. The control signal unit is provided with a plurality of different control states, and each control switch included in the control signal unit is in any one of a high-level state, a low-level state and an arbitrary level state under the different control states.
Specifically, in conjunction with fig. 2, four input interfaces, two-stage analog switches, three control switches and four MCUs are provided, where the states under the control of the three control switches are 4, namely 1, 2,3 and 4, respectively, and in the following table 1, the different control switches are in different states in the 4 states, and in the table 1, 0 represents that SW is received by DGND, that is, is in a low level state; 1 represents SW to vcc_3v3, i.e. high state; * Represents an arbitrary level state, such as 0 or 1 in table 1;
TABLE 1
Status of SW1 SW2 SW3
1 1 1 *
2 1 0 *
3 0 * 1
4 0 * 0
With reference to table 1, the specific implementation procedure is as follows:
In the case that the control signal unit is in state 1, when SW1 is connected to vcc_3v3 and SW2 is connected to vcc_3v3, any one of the channels S1A, S2A, S3A, S a of the analog switch U29 is active, and each of the channels S1B, S2B, S3B, S B is closed; any one of the channels S1A, S2A, S3A, S a of the analog switch U30 is active and each of the channels S1B, S2B, S3B, S B is closed; the SWC, SWD, UART _tx and uart_rx signals of the input signal unit enter through any one of the input ports D1, D2, D3 and D4 of the analog switch U29, correspondingly reach any one of the input ports D1, D2, D3 and D4 of the analog switch U30 through any one of the first output ports S1A, S2A, S3A, S a, and reach the mcu_1 through any one of the first output ports S1A, S2A, S3A, S a of the analog switch U30. The MCU_1 can be burnt and communicated through a serial port, and other MCUs are in an invalid state.
In the case that the control signal unit is in state 2, when SW1 is connected to vcc_3v3 and SW2 is connected to DGND, any one of the channels S1A, S2A, S3A, S a of the analog switch U29 is valid, and each of the channels S1B, S2B, S3B, S B is closed; any one of the channels S1B, S2B, S3B, S B of the analog switch U30 is active and each of the channels S1A, S2A, S3A, S a is closed; the SWC, SWD, UART _tx and uart_rx signals in the input signal unit enter through any one of the input ports D1, D2, D3 and D4 of the analog switch U29, reach any one of the input ports D1, D2, D3 and D4 of the analog switch U30 through any one of the first output ports S1A, S2A, S3A, S a, and reach the mcu_2 through any one of the second output ports S1B, S2B, S3B, S B of the analog switch U30. The MCU_2 can be burnt and communicated through a serial port, and other MCUs are in an invalid state.
When the control signal unit is in state 3, when SW1 is connected to DGND and SW3 is connected to vcc_3v3, any one of the channels S1B, S2B, S3B, S B of the analog switch U29 is active, and each of the channels S1A, S2A, S3A, S a is closed; any one of the channels S1A, S2A, S3A, S a of the analog switch U30 is active and each of the channels S1B, S2B, S3B, S B is closed; the SWC, SWD, UART _tx and uart_rx signals in the input signal unit enter through any one of the input ports D1, D2, D3 and D4 of the analog switch U29, reach any one of the input ports D1, D2, D3 and D4 of the analog switch U30 through any one of the second output ports S1B, S2B, S3B, S B, and reach the mcu_3 through any one of the first output ports S1A, S2A, S3A, S a of the analog switch U30. The MCU_3 can be burnt and communicated through a serial port, and other MCUs are in an invalid state.
In the case that the control signal unit is in state 4, when SW1 is connected to DGND and SW3 is connected to DGND, any one of the channels S1B, S2B, S3B, S B of the analog switch U29 is active, and each of the channels S1A, S2A, S3A, S a is closed; any one of the channels S1B, S2B, S3B, S B of the analog switch U30 is active and each of the channels S1A, S2A, S3A, S a is closed; the SWC, SWD, UART _tx and uart_rx signals in the input signal unit enter through any one of the input ports D1, D2, D3 and D4 of the analog switch U29, reach any one of the input ports D1, D2, D3 and D4 of the analog switch U30 through any one of the second output ports S1B, S2B, S3B, S B, and reach the mcu_4 through any one of the second output ports S1B, S2B, S3B, S B of the analog switch U30. The MCU_4 can be burnt and communicated through a serial port, and other MCUs are in an invalid state.
I.e., as long as the first stage uses 1 analog switch and 1 control switch, second stage using 2 analog switches and 2 control switches. The N stages use 2 N analog switches and 2 N-1 control switches, the 2 N MCU burn and serial communication can be realized.
Example 2
As shown in FIG. 1, the multi-MCU burning and serial port switching circuit comprises an input signal unit, a control signal unit, a switching circuit unit and an MCU unit, wherein the control signal unit controls the input signal unit to input signals of the switching circuit unit, the switching circuit unit transmits the received signals to the MCU unit, and the MCU is controlled to be in an effective state or an ineffective state through control signal transmission. Specifically, the input signal unit comprises a plurality of input interfaces, and the burning signal and the serial port debugging signal are transmitted through the plurality of input interfaces. The programming signal comprises a programming clock signal and a programming data signal, and the serial port debugging signal comprises a serial port sending signal and a serial port receiving signal. The control signal unit comprises a plurality of control switches, one end of each control switch is connected with a power supply or grounded, and the other end of each control switch is connected with the switching circuit unit.
In another implementation manner, the switching circuit unit is an analog switch circuit, in the circuit, Q8 is a first MOS transistor, Q13 is a second MOS transistor, Q7 is a third MOS transistor, and Q12 is a fourth MOS transistor; q11 is a fifth MOS tube, R3 is a first resistor, R4 is a second resistor, R6 is a third resistor, and R5 is a fourth resistor. The principle of combining the circuit is as follows: when IN1 is IN a high level state, the Q12 is turned on, the DS pole of the Q12 is conducted, the R6 is grounded, the R5 and the R6 are conducted because of the voltage division, so that the D1 and the S1A are conducted IN a bidirectional way, and when IN1 is IN a low level state, the D1 and the S1B are conducted IN a bidirectional way. The analog switch circuit is replaced with the analog switch in fig. 2. IN connection with fig. 3, D1 IN fig. 3 corresponds to D1 position IN the analog switch, IN1 corresponds to IN1 position IN the analog switch, S1A corresponds to S1A position IN the analog switch, S1B corresponds to S1B position IN the analog switch, and other circuit connections are as described IN embodiment 1. Similarly, when D2, D3, and D4 are required to be connected, only D1 needs to be correspondingly modified to D2, D3, and D4, and the corresponding IN1 may be correspondingly modified to IN2, IN3, and IN4, the corresponding S1A is correspondingly modified to S2A, S3A, S a, and the corresponding S1B is correspondingly modified to S2B, S3B, S B; the connection modes of other related MOS transistors and resistors are the same.
Specifically, as shown IN fig. 3, IN the case of connecting D1, IN1, S1A, and S1B, the analog switch circuit includes a first input port, a second input port, a first output port, and a second output port, where one end of the first input port is connected to the input signal unit, the other end of the first input port is connected to the drain of the first MOS transistor and the drain of the second MOS transistor, the gate of the first MOS transistor is connected to the gates of the first resistor, the second resistor, and the third MOS transistor, the source of the first MOS transistor is connected to the drain of the first resistor and the third MOS transistor, and the source of the third MOS transistor is connected to the second output port; the second resistor is connected with the second input port and the grid electrode of the fourth MOS tube, the source electrode of the fourth MOS tube is grounded, and the drain electrode of the fourth MOS tube is connected with the third resistor; the grid electrode of the second MOS tube is connected with the grid electrodes of the fourth resistor, the third resistor and the fifth MOS tube, the source electrode of the second MOS tube is connected with the drain electrode of the fifth MOS tube and the fourth resistor, the source electrode of the fifth MOS tube is connected with the first output port, and the first output port and the second output port are connected with the MCU unit; the first input port is connected with the input signal unit, and the second input port is connected with the control signal unit.
Example 3
Based on a multi-MCU programming and serial port switching circuit, a multi-MCU programming and serial port switching system can be implemented.
Finally, it should be noted that the above description is only for illustrating the technical solution of the present invention, and not for limiting the scope of the present invention, and that the simple modification and equivalent substitution of the technical solution of the present invention can be made by those skilled in the art without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1.一种多MCU的烧录和串口切换电路,其特征在于,包括输入信号单元、控制信号单元、切换电路单元和MCU单元,控制信号单元控制输入信号单元输入切换电路单元的信号,切换电路单元将接收到的信号传输至MCU单元,通过控制信号传输实现控制MCU处于有效或无效状态;1. A multi-MCU burning and serial port switching circuit, characterized in that it includes an input signal unit, a control signal unit, a switching circuit unit and an MCU unit, the control signal unit controls the input signal unit to input a signal of the switching circuit unit, the switching circuit unit transmits the received signal to the MCU unit, and controls the MCU to be in a valid or invalid state through the control signal transmission; 所述控制信号单元包括若干个控制开关,每个控制开关的一端接电源或接地,每个控制开关的另一端连接切换电路单元;The control signal unit includes a plurality of control switches, one end of each control switch is connected to a power supply or a ground, and the other end of each control switch is connected to a switching circuit unit; 所述MCU单元包括若干个MCU,最后一级的模拟开关的每个输出端口对应连接一个MCU;且第N级使用2N-1个模拟开关和2N-1个控制开关,实现2N个MCU的烧录和串口通信;The MCU unit includes several MCUs, and each output port of the analog switch of the last stage is connected to a corresponding MCU; and the Nth stage uses 2N -1 analog switches and 2N-1 control switches to realize the burning and serial port communication of 2N MCUs; 所述输入信号单元包括若干个输入接口,通过若干个输入接口传输烧录信号和串口调试信号;The input signal unit includes a plurality of input interfaces, through which the burning signal and the serial port debugging signal are transmitted; 其中,所述切换电路单元为模拟开关;Wherein, the switching circuit unit is an analog switch; 所述模拟开关设为一级时,模拟开关为一个数量,且模拟开关上设有若干个第一输入端口、第二输入端口、第一输出端口和第二输出端口,每个第一输入端口连接一个输入接口,第二输入端口连接控制信号单元,第一输出端口和第二输出端口连接MCU单元;When the analog switch is set to level one, the analog switch is a single number, and the analog switch is provided with a plurality of first input ports, second input ports, first output ports, and second output ports, each first input port is connected to an input interface, the second input port is connected to a control signal unit, and the first output port and the second output port are connected to an MCU unit; 所述模拟开关设为多级时,模拟开关设置2个以上的数量,第一级为一个模拟开关,第二级为两个模拟开关,且第二级的模拟开关的第一输入端口连接第一级的模拟开关的第一输出端口或第二输出端口,且第二级模块开关的第二输入端口IN1-IN4连接控制信号单元,第一输出端口和第二输出端口连接MCU单元。When the analog switch is set to multi-level, the analog switches are set to more than 2, the first level is one analog switch, the second level is two analog switches, and the first input port of the analog switch of the second level is connected to the first output port or the second output port of the analog switch of the first level, and the second input port IN1-IN4 of the second-level module switch is connected to the control signal unit, and the first output port and the second output port are connected to the MCU unit. 2.根据权利要求1所述的一种多MCU的烧录和串口切换电路,其特征在于,所述烧录信号包括烧录时钟信号和烧录数据信号,串口调试信号包括串口发送信号和串口接收信号。2. A multi-MCU burning and serial port switching circuit according to claim 1, characterized in that the burning signal includes a burning clock signal and a burning data signal, and the serial port debugging signal includes a serial port sending signal and a serial port receiving signal. 3.根据权利要求1所述的一种多MCU的烧录和串口切换电路,其特征在于,所述切换电路单元为模拟开关电路。3. A multi-MCU burning and serial port switching circuit according to claim 1, characterized in that the switching circuit unit is an analog switch circuit. 4.根据权利要求3所述的一种多MCU的烧录和串口切换电路,其特征在于,所述模拟开关电路包括第一输入端口、第二输入端口、第一输出端口和第二输出端口,第一输入端口一端连接输入信号单元,第一输入端口另一端连接第一MOS管的漏极和第二MOS管的漏极,第一MOS管的栅极连接第一电阻、第二电阻和第三MOS管的栅极,第一MOS管的源极连接第一电阻和第三MOS管的漏极,第三MOS管的源极连接第二输出端口;第二电阻连接第二输入端口和第四MOS管的栅极,第四MOS管的源极接地,第四MOS管的漏极连接第三电阻;第二MOS管的栅极连接第四电阻、第三电阻和第五MOS管的栅极,第二MOS管的源极接第五MOS管的漏极和第四电阻,第五MOS管的源极接第一输出端口,且第一输出端口和第二输出端口连接MCU单元;第一输入端口连接输入信号单元,第二输入端口连接控制信号单元。4. A multi-MCU burning and serial port switching circuit according to claim 3, characterized in that the analog switch circuit includes a first input port, a second input port, a first output port and a second output port, one end of the first input port is connected to the input signal unit, the other end of the first input port is connected to the drain of the first MOS tube and the drain of the second MOS tube, the gate of the first MOS tube is connected to the first resistor, the second resistor and the gate of the third MOS tube, the source of the first MOS tube is connected to the first resistor and the drain of the third MOS tube, and the source of the third MOS tube is connected to the second output port; the second resistor is connected to the second input port and the gate of the fourth MOS tube, the source of the fourth MOS tube is grounded, and the drain of the fourth MOS tube is connected to the third resistor; the gate of the second MOS tube is connected to the fourth resistor, the third resistor and the gate of the fifth MOS tube, the source of the second MOS tube is connected to the drain of the fifth MOS tube and the fourth resistor, the source of the fifth MOS tube is connected to the first output port, and the first output port and the second output port are connected to the MCU unit; the first input port is connected to the input signal unit, and the second input port is connected to the control signal unit. 5.一种多MCU的烧录和串口切换方法,应用于权利要求1-4任一项所述的多MCU的烧录和串口切换电路,其特征在于,所述切换电路单元包括多级双向双通道子单元,其中,末级子单元的两个通道上都分别连接一个MCU单元;5. A method for burning and serial port switching of multiple MCUs, applied to the burning and serial port switching circuit of multiple MCUs according to any one of claims 1 to 4, characterized in that the switching circuit unit comprises a multi-stage bidirectional dual-channel sub-unit, wherein two channels of the final sub-unit are respectively connected to an MCU unit; 方法包括:通过控制信号单元来控制每一级子单元仅有一个通道有效,以实现输入信号单元与任意一个MCU单元的连接。The method comprises: controlling each level of sub-units to have only one channel effective by controlling the signal unit, so as to realize the connection between the input signal unit and any MCU unit. 6.根据权利要求5所述的一种多MCU的烧录和串口切换方法,其特征在于,所述控制信号单元设置多个不同的控制状态,在不同的控制状态下,控制信号单元包括的每个控制开关分别处于高电平状态、低电平状态和任意电平状态中的任意一种状态。6. A method for burning and switching serial ports of multiple MCUs according to claim 5, characterized in that the control signal unit sets a plurality of different control states, and in different control states, each control switch included in the control signal unit is respectively in any one of a high level state, a low level state and an arbitrary level state. 7.一种多MCU的烧录和串口切换系统,其特征在于,包括权利要求1-4任意一项所述的一种多MCU的烧录和串口切换电路。7. A multi-MCU burning and serial port switching system, characterized by comprising a multi-MCU burning and serial port switching circuit according to any one of claims 1-4.
CN202311285456.2A 2023-09-28 2023-09-28 A multi-MCU burning and serial port switching circuit, method and system Active CN117472831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311285456.2A CN117472831B (en) 2023-09-28 2023-09-28 A multi-MCU burning and serial port switching circuit, method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311285456.2A CN117472831B (en) 2023-09-28 2023-09-28 A multi-MCU burning and serial port switching circuit, method and system

Publications (2)

Publication Number Publication Date
CN117472831A CN117472831A (en) 2024-01-30
CN117472831B true CN117472831B (en) 2024-11-12

Family

ID=89630255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311285456.2A Active CN117472831B (en) 2023-09-28 2023-09-28 A multi-MCU burning and serial port switching circuit, method and system

Country Status (1)

Country Link
CN (1) CN117472831B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2836372Y (en) * 2005-11-15 2006-11-08 海信集团有限公司 TV set with multi-channel video signal switching circuit
CN106325961A (en) * 2016-09-14 2017-01-11 北京小鸟看看科技有限公司 Burning circuit based on USB interface, virtual reality helmet and MCU firmware burning method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001155574A (en) * 1999-11-24 2001-06-08 Alps Electric Co Ltd Switch input module
CN101908885A (en) * 2010-06-30 2010-12-08 大连理工大学 Dual MCU control multi-channel high-speed analog signal collector
CN112051758B (en) * 2019-06-06 2023-12-15 广东省大金创新电子有限公司 IO expansion chip
CN111090605B (en) * 2019-10-10 2023-07-28 惠州市德赛西威汽车电子股份有限公司 USB-to-UART circuit for MCU software upgrade
CN215646783U (en) * 2021-09-29 2022-01-25 江苏精微特电子股份有限公司 2.4G wireless transceiver module's circuit
CN114466254A (en) * 2021-12-23 2022-05-10 科华数据股份有限公司 Serial port switching circuit and switching method thereof, communication manager and communication system
CN217640185U (en) * 2022-06-08 2022-10-21 深圳市元鼎智能创新有限公司 Circuit and equipment supporting software burning and power output
CN115185876A (en) * 2022-06-15 2022-10-14 深圳市亿联无限科技有限公司 Method and system for automatically detecting UART serial port signal line by electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2836372Y (en) * 2005-11-15 2006-11-08 海信集团有限公司 TV set with multi-channel video signal switching circuit
CN106325961A (en) * 2016-09-14 2017-01-11 北京小鸟看看科技有限公司 Burning circuit based on USB interface, virtual reality helmet and MCU firmware burning method

Also Published As

Publication number Publication date
CN117472831A (en) 2024-01-30

Similar Documents

Publication Publication Date Title
US11176071B2 (en) USB signal switch circuitry using standard USB hub and method of operation the same
CN110377553B (en) Method and device for detecting corresponding relation between hard disk backplane and mainboard port
CN106776428B (en) Terminal device, read-write device, data transmission system and hardware initialization method
CN101256544A (en) Method, apparatus and system for expansion of inside integrated circuit bus
CN109144942B (en) Device and method for master control board to manage service board
EP3451180B1 (en) Reconfigurable pin-to-pin interface capable of supporting different lane combinations and/or different physical layers and associated method
WO2002063480A2 (en) I2c self bus switching device
CN114003541B (en) A universal IIC bus circuit and transmission method thereof
CN117472831B (en) A multi-MCU burning and serial port switching circuit, method and system
CN114253898A (en) Bus device and data read-write circuit
US20070116067A1 (en) Serial multiplexer module for server management
CN113722259A (en) RS-485 and RS-232 shared interface circuit
CN113867741A (en) A system, method and device for debugging and upgrading an expansion chip
CN113113943A (en) System and method for dual port communication and power delivery
WO2006095838B1 (en) Single port/multiple ring implementation of a data switch
CN216748481U (en) Multi-axis servo single-panel display system
CN115303203A (en) Debugging board of vehicle-mounted controller, vehicle-mounted controller mainboard and vehicle
CN117908419A (en) Analog output circuit and clamping piece
CN210327615U (en) Communication circuit
CN216053016U (en) Different data bus signal access system
CN221622230U (en) External device and robot
CN114839897A (en) A multi-interface, input and output configurable Wiegand communication expansion board
CN220286015U (en) Fan driving circuit
CN214504405U (en) Optical communication test system integrated signal conversion device
CN220830486U (en) Circuit of SPDIF and HDMI ARC shared transmission channel

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