A machine and method for batch downloading programs
By designing a machine including a computer, serial module, power module, gate circuit and switching circuit, and using RTS signals to control the power module and switching circuit, the batch program download of the chip is realized, solving the problem of batch download in the existing technology and improving the download efficiency.
Patent Information
- Application Number
- CN202111163034.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-09-30
AI Technical Summary
The existing technology cannot realize batch program download of chips. The existing download module can only download a single module program, and cannot realize large-scale batch download.
Design a machine including a computer, serial module, power module, gate circuit, switch circuit, chip recording terminal and PC recording terminal. The power module and switch circuit are controlled through the RTS signal of the serial module to realize batch download of multiple chips.
It significantly improves the efficiency of chip program downloading, and can download multiple chips at the same time, saving time.
Smart Images

Figure CN113805904B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a machine for batch downloading programs, and also relates to a method for batch downloading programs into a chip, belonging to the technical field of integrated circuit manufacturing. Background Art
[0002] When a chip leaves the factory, it is often necessary to batch download the application programs specified by customers into the chip. In the prior art, the module for automatically downloading programs is a module integrating functions such as daily development debugging, mass production, and production testing. Existing download modules such as J-LinK or AMR emulators can only download programs for a single module and cannot achieve large-scale batch downloading.
[0003] In the Chinese patent application with the application number 201710266691.3, a program batch burning work platform and a batch burning method are disclosed. It includes the following sub-steps: S1. After the program of the first device is burned, the operating computer sends a signal to the controller through the communication interface; S2. After receiving the signal, the controller sends a switching signal to the multiplexer. After receiving the signal, the multiplexer starts to act and switches to the next device, so that the serial line input / output and the serial clock line required for burning the program are connected; S3. The controller also sends a power switching signal to the power supply selection circuit composed of the multiplexer. This signal controls the control pin of the MOS transistor to make the MOS transistor conduct, and the power supply port is led out from the conducting MOS transistor to connect the power supply of the next device. At this time, the program is burned for the next device; S4. Repeat steps S2 and S3 until all devices are burned. This technical solution can achieve one-to-many burning operations, and at the same time, it can be extended to be applicable to other one-to-many operation occasions with a relatively wide applicability of the circuit structure. Summary of the Invention
[0004] The primary technical problem to be solved by the present invention is to provide a machine for batch downloading programs.
[0005] Another technical problem to be solved by the present invention is to provide a method for batch downloading programs into a chip.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] According to the first aspect of the embodiments of the present invention, a machine platform for batch downloading programs is provided, including a computer (PC), a serial port module, a power supply module, a gate circuit, a switch circuit, at least one set of chip programming terminals, at least one set of chip power terminals, and at least one set of PC programming terminals; wherein, the computer is connected to the serial port module, the power supply module is connected to the serial port module, the power supply module, the gate circuit, the switch circuit, and at least one set of the chip power terminals, the serial port module is connected to the gate circuit and the switch circuit, the gate circuit is connected to the switch circuit, and the switch circuit is respectively connected to at least one set of the chip programming terminals and at least one set of the PC programming terminals;
[0008] The computer is configured to output a control signal according to the download mode;
[0009] The serial port module is configured to output a first RTS signal and a second RTS signal under the control of the control signal;
[0010] The power supply module is configured to supply power to the serial port module, the gate circuit, the switch circuit, and chips of multiple programs to be downloaded under the control of the first RTS signal;
[0011] The gate circuit is configured to input the second RTS signal and the transmission data signal output by the serial port module, and output a logic signal;
[0012] The switch circuit is configured to, under the control of the second RTS, conduct the path between the chip programming terminal and the serial port module, or conduct the path between the PC programming terminal and the serial port module according to the received data signal output by the serial port module and the logic signal.
[0013] Preferably, the computer includes a USB module and a control module;
[0014] The control module is configured to respond to the download mode triggered by the user and control the USB module to output the control signal.
[0015] Preferably, after the switch circuit conducts the path between the chip programming terminal and the serial port module, or conducts the path between the PC programming terminal and the serial port module, the control module is further configured to:
[0016] Control the USB module to output program data to the chip or the PC through the serial port module.
[0017] Preferably, the serial port module includes a first serial port chip that outputs the first RTS and multiple second serial port chips that output the second RTS;
[0018] The data terminal of the first serial port chip is connected to a set of data terminals of the USB module, and the RTS terminal of the first serial port chip is connected to the power supply module;
[0019] The data terminal of the second serial port chip is connected to other sets of data terminals of the USB module. The transmit data terminal of the second serial port chip is connected to the gate circuit, the receive data terminal of the second serial port chip is connected to the switch circuit, and the RTS terminal of the second serial port chip is connected to the gate circuit, the switch circuit, and the reset terminal of the chip.
[0020] Preferably, the gate circuit includes multiple AND gates corresponding to the second serial port chip;
[0021] For each group of the second serial port chip and the AND gate, the first input terminal of the AND gate is connected to the transmit data terminal of the second serial port chip, the second input terminal of the AND gate is connected to the RTS terminal of the second serial port chip, and the output terminal of the AND gate is connected to the switch circuit.
[0022] Preferably, the switch circuit includes multiple double-pole double-throw switches corresponding to the AND gates;
[0023] For each group of the AND gate and the double-pole double-throw switch, the first input terminal of the double-pole double-throw switch is connected to the receive data terminal of the corresponding second serial port chip of the AND gate, the second input terminal is connected to the output terminal of the AND gate, the control terminal is connected to the computer, the first output terminal is connected to the receive data terminal of the chip programming terminal, the second output terminal is connected to the receive data terminal of the PC programming terminal, the third output terminal is connected to the transmit data terminal of the chip programming terminal, and the fourth output terminal is connected to the transmit data terminal of the PC programming terminal.
[0024] According to the second aspect of the embodiments of the present invention, a method for batch downloading programs into a chip is provided, which is used in the above-mentioned machine tool, and includes the following steps:
[0025] Generate a control signal by a computer according to a download mode;
[0026] Generate a first RTS signal and a second RTS signal by the serial port module under the control of the control signal;
[0027] Power the serial port module, the gate circuit, the switch circuit, and multiple chips to be downloaded with programs by the power supply module under the control of the first RTS signal;
[0028] Output a logic signal by the gate circuit according to the second RTS signal and the transmit data signal output by the serial port module;
[0029] Through the switch circuit, under the control of the second RTS, according to the received data signal output by the serial port module and the logic signal, the path between the chip programming terminal and the serial port module is conducted, or the path between the PC programming terminal and the serial port module is conducted.
[0030] Preferably, when the download mode is the two-wire mode, it includes the following sub-steps:
[0031] Power the serial port module, the switch circuit, and the gate circuit through the power module;
[0032] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0033] Control the level of the transmission data terminal of the chip programming terminal by the serial port module to change from high level to low level and then to high level;
[0034] Output program data to the chip programming terminal through the serial port module.
[0035] Preferably, when the download mode is the three-wire mode, it includes the following sub-steps:
[0036] Power the serial port module, the switch circuit, and the gate circuit through the power module;
[0037] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0038] Control the level of the chip reset terminal by the serial port module to change from high level to low level and then to high level;
[0039] Output program data to the chip programming terminal through the serial port module.
[0040] Preferably, when the download mode is the normal mode, it includes the following sub-steps:
[0041] Power the serial port module, the switch circuit, the gate circuit, and the chip to be downloaded with the program through the power module;
[0042] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0043] Control the level of the chip reset terminal by the serial port module to change from high level to low level and then to high level;
[0044] Output the program data to the chip programming terminal through the serial port module; or
[0045] Power the serial port module, the switch circuit, the gate circuit, and the chip to be downloaded with the program through the power module;
[0046] Under the control of the second RTS signal sent by the serial port module, conduct the path between the PC programming terminal and the serial port module through the switch circuit;
[0047] Output the program data to the PC programming terminal through the serial port module.
[0048] Compared with the prior art, the machine provided by the present invention includes at least one set of chip programming terminals and at least one set of PC programming terminals. By controlling the power module and the switch circuit through the RTS pin of the serial port module, batch downloading of the program to be downloaded can be realized, significantly improving the downloading efficiency. Description of the Drawings
[0049] Figure 1 It is a schematic structural diagram of a machine for batch downloading programs provided by an embodiment of the present invention;
[0050] Figure 2 It is another schematic structural diagram of a machine for batch downloading programs provided by an embodiment of the present invention;
[0051] Figure 3 It is a schematic circuit diagram of a machine for batch downloading programs provided by an embodiment of the present invention;
[0052] Figure 4 It is a schematic diagram set of a method for batch downloading programs provided by an embodiment of the present invention;
[0053] Figure 5 It is a schematic circuit diagram of manually controlling the chip reset with a pull-up / pull-down resistor;
[0054] Figure 6 It is a schematic circuit diagram of an external MCU chip driving an IO to control the chip reset. Detailed Embodiments
[0055] The technical content of the present invention will be described in detail below in conjunction with the drawings and specific embodiments.
[0056] As Figure 1As shown in the figure, it is a schematic structural diagram of a machine for batch downloading programs provided by an embodiment of the present invention, including a computer (PC) 10, a serial port module 30, a power supply module 20, a gate circuit 40, a switch circuit 50, at least one group of chip programming terminals (BOOT_RX and BOOT_TX), at least one group of chip power terminals (not shown in the figure), and at least one group of PC programming terminals (RX and TX). Among them, the computer 10 is connected to the serial port module 30, the power supply module 20 is connected to the serial port module 30, the power supply module 20, the gate circuit 40, the switch circuit 50, and at least one group of chip power terminals, the serial port module 30 is connected to the gate circuit 40 and the switch circuit 50, the gate circuit 40 is connected to the switch circuit 50, and the switch circuit 50 is connected to at least one group of chip programming terminals (BOOT_RX and BOOT_TX) and at least one group of PC programming terminals (RX and TX).
[0057] In the machine provided by the embodiment of the present invention, it includes:
[0058] A computer 10, configured to output a control signal according to the download mode;
[0059] A power supply module 20, configured to supply power to the serial port module 30, the gate circuit 40, the switch circuit 50, and at least one group of chip power terminals under the control of the first RTS signal;
[0060] A serial port module 30, configured to output a first RTS signal and a second RTS signal under the control of the control signal;
[0061] A gate circuit 40, configured to input the second RTS signal and the transmission data signal output by the serial port module 30, and output a logic signal;
[0062] A switch circuit 50, configured to, under the control of the second RTS signal, conduct the path between the chip programming terminals (BOOT_RX and BOOT_TX) and the serial port module 30, or conduct the path between the PC programming terminals (RX and TX) and the serial port module 30 according to the received data signal and the logic signal output by the serial port module 30.
[0063] Since the machine in the embodiment of the present invention includes at least one group of chip programming terminals and at least one group of PC programming terminals, and controls the power module and the switch circuit through the RTS pin of the serial port module, batch downloading of the program to be downloaded can be realized, thereby improving the download efficiency. In addition, by switching the switch circuit, the program can be selected to be downloaded into the chip, and the program can also be selected to be downloaded to the PC side. It should be noted that although the embodiment of the present invention does not exclude the case where there is only one group of chip programming terminals and PC programming terminals, from the perspective of achieving the purpose of the invention, the more the number of chip programming terminals and PC programming terminals, the better.
[0064] Such as Figure 2As shown in the figure, it is a schematic structural diagram of another machine provided by an embodiment of the present invention. Among them, the computer 10 may include a USB module 101 and a control module 102;
[0065] The control module 102 is used to respond to the download mode triggered by the user and control the USB module 101 to output a control signal.
[0066] After the switch circuit 50 conducts the path between the chip programming terminal and the serial port module 30, or conducts the path between the PC programming terminal and the serial port module 30, the control module 102 is further used for:
[0067] Controlling the USB module 101 to output program data to the chip or the PC through the serial port module 30.
[0068] In an embodiment of the present invention, as Figure 3 shown, the serial port module may include a first serial port chip U8 that outputs a first RTS and multiple second serial port chips U1, U2, U3 that output second RTS signals;
[0069] The data terminal of the first serial port chip U8 is connected to a group of data terminals of the USB module 102, and the RTS terminal of the first serial port chip U8 is connected to the power supply module 20;
[0070] The data terminals of the second serial port chips U1, U2, U3 are connected to other groups of data terminals of the USB module 101. The data sending terminals of the second serial port chips U1, U2, U3 are connected to the gate circuit 40, the data receiving terminals of the second serial port chips U1, U2, U3 are connected to the switch circuit 50, and the RTS terminals of the second serial port chips U1, U2, U3 are connected to the gate circuit 40, the switch circuit 50, and the chip reset terminal REST.
[0071] In the above embodiment, Figure 3 the RTS4 therein is the first RTS signal, Figure 3 the RTS1, RTS2, and RTS3 therein are the second RTS signals. The gate circuit includes multiple AND gates corresponding to the second serial port chips U1, U2, U3. The second serial port chip U1 corresponds to the AND gate AND1, the second serial port chip U2 corresponds to the AND gate AND2, and the second serial port chip U3 corresponds to the AND gate AND3. For each group of the second serial port chip and the AND gate, the first input terminal of the AND gate is connected to the data sending terminal of the second serial port chip, the second input terminal of the AND gate is connected to the RTS terminal of the second serial port chip, and the output terminal of the AND gate is connected to the switch circuit.
[0072] The switch circuit 50 includes multiple double-pole double-throw switches corresponding to the AND gates. For example, in Figure 3Among them, the double - pole double - throw switch K1 corresponds to the AND gate AND1, the double - pole double - throw switch K2 corresponds to the AND gate AND2, and the double - pole double - throw switch K3 corresponds to the AND gate AND3. For each group of AND gate and double - pole double - throw switch, the first input terminal of the double - pole double - throw switch is connected to the receiving data terminal of the corresponding second serial port chip of the AND gate, the second input terminal is connected to the output terminal of the AND gate, and the control terminal is connected to the computer. On the other hand, the first output terminal of the double - pole double - throw switch is connected to the receiving data terminal of the chip programming terminal, the second output terminal is connected to the receiving data terminal of the PC programming terminal, the third output terminal is connected to the sending data terminal of the chip programming terminal, and the fourth output terminal is connected to the sending data terminal of the PC programming terminal.
[0073] The power supply module may include 4 power chips, which supply power to the serial port module, the gate circuit, the switch circuit, and at least one group of chip power supply terminals respectively.
[0074] In the embodiments of the present invention, serial communication is used between the computer and each module. The USB - serial port in the embodiments of the present invention can also be USB - RS232. Their circuit structures are the same, and both have RX, TX, and RST pins. The difference lies in the communication protocol and the chips. The USB - serial port uses the ch340 chip, and the USB - RS232 uses the MAX232 chip. Their circuit structures are the same as those of Figure 3 the serial port module in
[0075] It should be noted that Figure 3 the description is made by taking 3 second - serial port chips as an example. In other embodiments, more second - serial port chips may also be included.
[0076] Based on a similar inventive concept, the embodiments of the present invention also provide a method for batch downloading programs into a chip, which is used in the above - mentioned machine. As Figure 4 shown, the method at least includes the following steps:
[0077] S401: Generate a control signal by the computer according to the download mode;
[0078] S402: Generate a first RTS signal and a second RTS signal by the serial port module under the control of the control signal;
[0079] S403: Supply power to the serial port module, the gate circuit, the switch circuit, and multiple chips to be downloaded with programs by the power supply module under the control of the first RTS signal;
[0080] S404: Output a logic signal by the gate circuit according to the second RTS signal and the sending data signal output by the serial port module;
[0081] S405. Under the control of the second RTS, through the switch circuit, according to the received data signal output by the serial port module and the logic signal, conduct the path between the chip programming terminal and the serial port module, or conduct the path between the PC programming terminal and the serial port module.
[0082] Optionally, when the download mode is the two-wire method, it includes the following sub-steps:
[0083] Power the serial port module, the switch circuit, and the gate circuit through the power module;
[0084] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0085] Control the level of the data sending end of the chip programming terminal by the serial port module to change from high level to low level, and then to high level;
[0086] Output program data to the chip programming terminal through the serial port module.
[0087] Optionally, when the download mode is the three-wire method, it includes the following sub-steps:
[0088] Power the serial port module, the switch circuit, and the gate circuit through the power module;
[0089] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0090] Control the level of the chip reset terminal by the serial port module to change from high level to low level, and then to high level;
[0091] Output program data to the chip programming terminal through the serial port module.
[0092] Optionally, when the download mode is the normal method, it includes the following sub-steps:
[0093] Power the serial port module, the switch circuit, the gate circuit, and the chip to be downloaded with the program through the power module;
[0094] Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit;
[0095] Control the level of the chip reset terminal by the serial port module to change from high level to low level, and then to high level;
[0096] Output the program data to the chip programming terminal through the serial port module; or
[0097] Power the serial port module, the switch circuit, the gate circuit, and the chip to be downloaded with the program through the power module;
[0098] Under the control of the second RTS signal sent by the serial port module, conduct the path between the PC programming terminal and the serial port module through the switch circuit;
[0099] Output the program data to the PC programming terminal through the serial port module.
[0100] For ease of understanding, the following combines Figure 3 Provide a detailed description of the program batch download mode provided by the embodiments of the present invention:
[0101] 1. Two-wire method:
[0102] As Figure 3 shown, the local station can disconnect the chip power supply and connect the pins (TXD_IC, RXD_IC) in the switch circuit to the (BOOT_RX, BOOT_TX, GND) of the chip. After the pin connection is completed, the chip can be downloaded and programmed.
[0103] Take Figure 3 as an example. When programming the chip:
[0104] The first step is that the computer sends an instruction to RTS4 through the serial port. When RTS4 changes from low level to high level and remains unchanged, the power module starts to supply power to the serial port module, the switch circuit, and the gate circuit.
[0105] The second step is that the computer sends instructions to RTS1, RTS2, and RTS3 through the serial port to make them high level, and controls the switch circuit to select TXD_IC and RXD_IC.
[0106] The third step is that the pins (TXD_IC, RXD_IC) in the switch circuit are connected to the (BOOT_RX, BOOT_TX) of the chip. Since TXD_IC is an output pin and is connected to BOOT_RX, the chip is powered through leakage. Then the computer sends high level -> low level -> high level to TXD_IC through the serial port, so that the chip completes reset through power-off, and the computer shakes hands successfully with the chip.
[0107] The fourth step is to program the chip.
[0108] 2. Three-wire method:
[0109] As Figure 3As shown, this machine can cut off the power supply to the chip and connect the three pins (TX, RX, RTS) of the serial port module to the (BOOT_RX, BOOT_TX, RESET) of the chip. After the pin connection is completed, the chip can be downloaded and programmed.
[0110] Take Figure 3 as an example. When programming the chip:
[0111] First step, the computer sends an instruction to RTS4 through the serial port. When RTS4 changes from low level to high level and remains unchanged, the power supply module starts to supply power to the serial port module, switch module, and gate circuit.
[0112] Second step, the computer sends instructions to RTS1, RTS2, and RTS3 through the serial port to make them high level, controlling the switch circuit to select TXD_IC and RXD_IC.
[0113] Third step, the pins (TXD_IC, RXD_IC) in the switch circuit are connected to the (BOOT_RX, BOOT_TX) of the chip. Since TXD_IC is an output pin, after being connected to BOOT_RX, it supplies power to the chip through leakage.
[0114] Fourth step, the serial ports RTS1, RTS2, and RTS3 are connected to the REST pins of each chip. The computer then sends instructions to RTS1, RTS2, and RTS3 through the serial port to make them change from high level -> low level -> high level, completing the chip reset and making the computer handshake successfully with the chip.
[0115] Fifth step, program the chip.
[0116] 3. Normal mode:
[0117] Such as Figure 3 shown, this machine provides two groups of serial ports. One group (TXD_IC, RXD_IC) is connected to the (BOOT_RX, BOOT_TX) of the chip, and the other group (TXD_PC, RXD_PC) can be selectively connected to the PC client. When programming in normal mode, connect the three pins (TX, RX, RTS) of the serial port module to the (BOOT_RX, BOOT_TX, RESET) of the chip, and the power supply module supplies power to the chip. After the pin connection is completed, the chip can be downloaded and programmed.
[0118] (1) Take Figure 3 as an example. When programming the chip:
[0119] First step, the computer sends an instruction to RTS4 through the serial port. When RTS4 changes from low level to high level and remains unchanged, the power supply module starts to supply power to the serial port module, switch module, gate circuit, and chip module.
[0120] In the second step, the computer sends instructions to RTS1, RTS2, and RTS3 through the serial port to make them at high level, controlling the switch circuit to select TXD_IC and RXD_IC.
[0121] In the third step, the (TXD_IC, RXD_IC) pins in the switch circuit are connected to the (BOOT_RX, BOOT_TX) of the chip.
[0122] In the fourth step, the serial ports RTS1, RTS2, and RTS3 are connected to the REST pins of each chip. Then the computer sends instructions to RTS1, RTS2, and RTS3 through the serial port to make their levels change from high to low and then to high, completing the chip reset and enabling the computer to successfully handshake with the chip.
[0123] In the fifth step, program burning is performed on the chip.
[0124] (2) Taking Figure 3 as an example, PC client burning:
[0125] In the first step, the computer sends instructions to RTS4 through the serial port. When RTS4 changes from low level to high level and remains unchanged, the power supply module starts to supply power to the serial port module, switch module, gate circuit, and chip module.
[0126] In the second step, the computer sends instructions to RTS1, RTS2, and RTS3 through the serial port to make them at low level, controlling the switch circuit to select TXD_PC and RXD_PC.
[0127] In the third step, the (TXD_PC, RXD_PC) pins in the switch circuit are connected to the (RX, TX) of the PC client.
[0128] In the fourth step, the PC client performs program burning.
[0129] It should be noted that the (BOOT_RX, BOOT_TX) of the chip is the chip burning terminal on the machine platform, and the (RX, TX) of the PC client is the PC burning terminal on the machine platform.
[0130] In the embodiment of the present invention, the level of RTS is used to control the chip reset or power on / off, which is equivalent to directly shaking hands with the chip automatically. Specifically, when the chip is powered on, the level of the RTS pin of the serial port module changes between high and low. The EN pin of the power module defaults to a low level, and at this time the power module does not work. When the RTS pin of a certain serial port module changes from a low level to a high level, the RTS pin acts on the EN pin of the power module, and the power module starts to work. At the same time, after the power supply is provided, the chip starts to be powered. The RTS pin of another serial port module is connected to the RESET pin of the chip. At this time, the RTS pin is at a high level, and the chip works normally. When the level of the RTS pin changes from high level -> low level -> high level, this is equivalent to resetting the chip or the pin. After the reset is completed, there is an interaction process equivalent to shaking hands. If the interaction is successful, this link is successfully completed, and the level of the RTS pin remains fixed, and the transmission link starts to conduct.
[0131] The program in the computer realizes handshaking with the chip through the above pins, so that the transmission link is conducted. The computer uses the two RTS control pins of the two serial port modules at the same time. The RST (such as Figure 2 : RTS4) control pin of one serial port module is used to control the power supply, and the RST (such as Figure 2 : RTS1) of one serial port module controls the handshaking. Then, after the power supply is normal and the handshaking is successful, the program in the computer can be automatically downloaded into the chip.
[0132] In the prior art, one serial port can only download programs to one chip. In the embodiment of the present invention, multiple serial ports can be used to connect multiple chips at the same time. Since the chips are mass-produced and there is no difference between them, the machine of the present invention can realize simultaneous downloading to save time. After the programs of each batch of chips are downloaded in batches, they are directly taken out. Then, a new batch of chips is installed on the machine, and the PC burning end is used to start the batch downloading of the programs for the new batch of chips.
[0133] Next, the processes of resetting the chip by manually pulling up and down resistors and resetting the chip by an external MCU driving an IO are further described.
[0134] 1. Resetting the chip by manually pulling up and down resistors:
[0135] As Figure 5 shown, without using the RST1, RST2, and RST3 pins, N external pull-up and pull-down resistor reset circuits are built as Figure 5 shown to replace the function of the serial port RST pin. In Figure 5In the shown circuit, the REST pin of the chip is connected to the reset circuit. The 3.3V power supply provides a high level to the REST pin of the chip through a resistor, and the chip is in the normal working state. When the push-button switch is pressed, the high level of the REST pin of the chip becomes low level. When the push-button switch is released, the low level of the REST pin of the chip becomes high level, thus realizing the reset of the chip.
[0136] 2. The external MCU chip drives the IO to control the chip reset:
[0137] As Figure 6 shown, without using the RST1, RST2, and RST3 pins, directly build a driving IO circuit of an external MCU chip to replace the RST pin function of the serial port module. In Figure 6 the shown circuit, the REST pin of the chip is connected to the IO end of the external MCU chip. When the IO end of the external MCU chip is at a high level, the REST pin of the chip is at a high level and is in the normal working state; when the IO end of the external MCU chip has a change of high level -> low level -> high level, the REST pin of the chip also has a change of high level -> low level -> high level, and the chip completes the reset.
[0138] Compared with the prior art, the machine in the present invention includes at least one group of chip programming terminals and at least one group of PC programming terminals. By controlling the power module and the switch circuit through the RTS pin of the serial port module, batch downloading of the program to be downloaded can be realized, significantly improving the downloading efficiency.
[0139] The above has described in detail the machine and method for batch downloading programs provided by the present invention. For those of ordinary skill in the art, any obvious changes made without departing from the essence of the present invention will constitute an infringement of the patent right of the present invention and will bear corresponding legal responsibilities.
Claims
1. A machine for batch-downloading programs, characterized in that It includes a computer, a serial port module, a power supply module, a gate circuit, a switch circuit, at least one set of chip programming terminals, at least one set of chip power terminals, and at least one set of PC programming terminals; the computer is connected to the serial port module, the power supply module is connected to the serial port module, the gate circuit, the switch circuit, and at least one set of the chip power terminals, the serial port module is connected to the gate circuit and the switch circuit, the gate circuit is connected to the switch circuit, and the switch circuit is respectively connected to at least one set of the chip programming terminals and at least one set of the PC programming terminals; wherein, the computer is configured to output a control signal according to the download mode; the serial port module is configured to output a first RTS signal and a second RTS signal under the control of the control signal; the power supply module is configured to supply power to the serial port module, the gate circuit, the switch circuit, and at least one set of chip power terminals under the control of the first RTS signal; the gate circuit is configured to input the second RTS signal and the transmission data signal output by the serial port module, and output a logic signal; the switch circuit is configured to, under the control of the second RTS signal, conduct the path between the chip programming terminal and the serial port module, or conduct the path between the PC programming terminal and the serial port module according to the received data signal output by the serial port module and the logic signal.
2. The machine platform according to claim 1, wherein: the computer includes a USB module and a control module; the control module is configured to respond to the download mode triggered by the user and control the USB module to output the control signal.
3. The machine according to claim 2, wherein, After the switch circuit conducts the path between the chip programming terminal and the serial port module, or conducts the path between the PC programming terminal and the serial port module, the control module is further configured to: control the USB module to output program data to the chip or the PC through the serial port module.
4. The machine tool according to claim 2, characterized in that: the serial port module includes a first serial port chip that outputs the first RTS and multiple second serial port chips that output the second RTS; the data terminal of the first serial port chip is connected to a set of data terminals of the USB module, and the RTS terminal of the first serial port chip is connected to the power supply module; the data terminals of the second serial port chips are connected to other sets of data terminals of the USB module, the transmission data terminals of the second serial port chips are connected to the gate circuit, the received data terminals of the second serial port chips are connected to the switch circuit, and the RTS terminals of the second serial port chips are connected to the gate circuit, the switch circuit, and the reset terminal of the chip.
5. The machine platform according to claim 4, wherein: the gate circuit includes multiple AND gates corresponding to the second serial port chips; For each set of second serial port chips and AND gates, the first input terminal of the AND gate is connected to the transmission data terminal of the second serial port chip, the second input terminal of the AND gate is connected to the RTS terminal of the second serial port chip, and the output terminal of the AND gate is connected to the switch circuit.
6. The machine platform according to claim 5, wherein: the switch circuit includes multiple double-pole double-throw switches corresponding to the AND gates; For each group of AND gates and double-throw switches, the first input terminal of the double-throw switch is connected to the receiving data terminal of the corresponding second serial port chip of the AND gate, the second input terminal is connected to the output terminal of the AND gate, the control terminal is connected to the computer, the first output terminal is connected to the receiving data terminal of the chip programming terminal, the second output terminal is connected to the receiving data terminal of the PC programming terminal, the third output terminal is connected to the sending data terminal of the chip programming terminal, and the fourth output terminal is connected to the sending data terminal of the PC programming terminal.
7. A method for batch downloading programs into a chip, which is used in the machine tool according to any one of claims 1 to 6, characterized in that It includes the following steps: Generate a control signal by the computer according to the download mode; Generate a first RTS signal and a second RTS signal by the serial port module under the control of the control signal; Power the serial port module, the gate circuit, the switch circuit, and multiple chips to be downloaded with programs by the power module under the control of the first RTS signal; Output a logic signal by the gate circuit according to the second RTS signal and the sending data signal output by the serial port module; Through the switch circuit, under the control of the second RTS, according to the received data signal and the logic signal output by the serial port module, conduct the path between the chip programming terminal and the serial port module, or conduct the path between the PC programming terminal and the serial port module.
8. The method according to claim 7, wherein When the download mode is the two-wire method, it includes the following sub-steps: Power the serial port module, the switch circuit, and the gate circuit by the power module; Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit; Control the level of the sending data terminal of the chip programming terminal by the serial port module to be converted from high level to low level, and then to high level; Output program data to the chip programming terminal by the serial port module.
9. The method according to claim 7, wherein When the download mode is the three-wire method, it includes the following sub-steps: Power the serial port module, the switch circuit, and the gate circuit by the power module; Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit; Control the level of the chip reset terminal by the serial port module to be converted from high level to low level, and then to high level; Output program data to the chip programming terminal by the serial port module.
10. The method according to claim 7, characterized in that, When the download mode is the normal method, it includes the following sub-steps: Power the serial port module, the switch circuit, the gate circuit, and the chips to be downloaded with programs by the power module; Under the control of the second RTS signal sent by the serial port module, conduct the path between the chip programming terminal and the serial port module through the switch circuit; Control the level of the chip reset terminal by the serial port module to be converted from high level to low level, and then to high level; Output program data to the chip programming terminal by the serial port module; or Power the serial port module, the switch circuit, the gate circuit, and the chips to be downloaded with programs by the power module; Under the control of the second RTS signal sent by the serial port module, the path between the PC programming terminal and the serial port module is turned on through the switching circuit; The program data is output to the PC programming terminal through the serial port module.
Citation Information
Patent Citations
Program batch burning work platform and batch burning method
CN107015836B
Program batch burning working platform and batch burning method
CN107015836A
Burning tool and burning method capable of burning two DSPs at the same time
CN107885510A