A signal conversion device, system and method for single chip microcomputer online programming

By designing a signal conversion device for online programming of microcontrollers, using the MCU to selectively connect signals and realize signal conversion through level converters and enable chips, the problem that existing programmers cannot program online for certain microcontroller models is solved, and the support for dual-line and single-line programming modes is realized, which simplifies operation steps and is suitable for large-scale burning.

CN113377036BActive Publication Date: 2025-04-25小华半导体有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010156011.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-09
Publication Date
2025-04-25
Estimated Expiration
2040-03-09

AI Technical Summary

Technical Problem

Existing programmers cannot program some microcontroller models online, especially those that support dual-line and single-line programming modes, resulting in cumbersome operation steps and cannot meet the needs of large-scale burning.

Method used

A signal conversion device is designed to selectively connect the dual-wire universal asynchronous transceiver signal or single-wire signal between the programmer interface and the target chip interface through the MCU, and realize signal conversion through the level converter and enable chip, supporting dual-wire and single-wire programming modes.

Benefits of technology

It realizes the online programming function of microcontroller models that support dual-line and single-line programming modes, simplifies operation steps, reduces design and verification cycles, and is suitable for large-scale burning requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113377036B_ABST
    Figure CN113377036B_ABST
Patent Text Reader

Abstract

The present invention discloses a signal conversion device for online programming of a single-chip microcomputer, comprising: a programmer interface, the programmer interface is connected to an external programmer; a target chip interface, the target chip interface is connected to a target chip that needs to be online programmed; and an MCU arranged between the programmer interface and the target chip interface, and the MCU selects to perform two-line universal asynchronous receiver-transmitter programming or single-line programming on the target chip through a two-line universal asynchronous receiver-transmitter programming signal received from the programmer through the programmer interface. The signal conversion device, system and method for online programming of a single-chip microcomputer disclosed by the present invention can effectively solve the problem that the existing programmer cannot burn certain specific chips.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of single-chip microcomputer online programming, and in particular to a device, system and method for realizing online programming signal conversion in a single-chip microcomputer system. Background Art

[0002] The development of MCU program memory such as FLASH has made firmware burning and updating easier and more feasible. However, the chip packaging is becoming more and more sophisticated, making it difficult to move the chip. The online programming ISP (In System Program) of the MCU (Microcontroller Unit) means that the user does not need to remove the MCU from the assembled printed circuit board PCBA (Printed Circuit Board Assembly) and put it on a specific burner for program burning; it can be done directly on the printed circuit board by the programmer PGM (Programmer) through the communication interface of the MCU. The communication interface of the MCU is usually the universal asynchronous receiver / transmitter serial port UART (Universal Asynchronous Receiver / Transmitter).

[0003] There are many types of single-chip microcomputers. Due to application requirements, some types of single-chip microcomputers have a special online programming method. They can be programmed through the communication interface (UART) and support single-line (TOOL0) mode programming. At this time, the general programmer cannot meet the requirements and an external signal conversion device is required for processing.

[0004] Currently, there is no such device in the art that is suitable for the signal conversion of the programmer. Therefore, when a large number of microcontrollers with special burning requirements need to be burned, the operation steps are very troublesome. Summary of the invention

[0005] Existing programmers are unable to complete the online programming function for certain microcontroller models, and the development and verification cycle of new programmers is long. Therefore, the inventors hope to design a compact signal conversion device based on the original programmer in a short period of time for use in some microcontrollers that require special programming. At the same time, the software and hardware design ideas of the signal conversion device can be used as a reference for the principles of subsequent updates to the programmer, thereby reducing the risks of subsequent design work.

[0006] According to one embodiment of the present invention, there is provided a signal conversion device for online programming of a single-chip microcomputer, comprising:

[0007] A programmer interface, the programmer interface is connected to an external programmer;

[0008] A target chip interface, the target chip interface being connected to a target chip to be programmed online; and

[0009] The MCU is arranged between the programmer interface and the target chip interface. The MCU selects to perform two-wire universal asynchronous receiver transmitter programming or single-wire programming on the target chip through the two-wire universal asynchronous receiver transmitter programming signal received from the programmer through the programmer interface.

[0010] In one embodiment of the present invention, the programmer interface includes a first data transmission port, a first data reception port and a reset input,

[0011] The target chip interface includes a second data receiving port, a second data sending port, a single-line port and a reset output,

[0012] The first data transmission port is connected to the second data receiving port or the single-line port through the selection of the MCU.

[0013] The first data receiving port is connected to the second data sending port or the single-line port through the selection of the MCU.

[0014] The reset input is connected to the reset output through the MCU.

[0015] In one embodiment of the present invention, the signal conversion device for online programming of the single-chip microcomputer also includes an output enable chip OE, which is connected to the connection path from the first data receiving port to the single-line port. During single-line programming, when the first data receiving port needs to send data, OE is enabled, and when receiving data, OE is disabled to avoid interference in data transmission during single-line programming.

[0016] In one embodiment of the present invention, when single-line programming is performed, the first data transmission port is connected to the single-line port through the MCU; the first data receiving port is connected to the single-line port through the MCU and the OE.

[0017] When the first data receiving port needs to send data, OE is enabled and the data is transmitted from the first data receiving port to the single-line port. When the first data sending port receives data, OE is disabled and the data is transmitted from the single-line port to the first data sending port.

[0018] In one embodiment of the present invention, the signal conversion device for single-chip microcomputer online programming further includes a level converter, which is arranged between the MCU and the target chip interface and is used to convert the voltage of the MCU or the target chip.

[0019] In one embodiment of the present invention, when programming a two-wire universal asynchronous receiver and transmitter, a first data transmitting port is connected to a second data receiving port through an MCU, and data is transmitted from the second data receiving port to the first data transmitting port; and a first data receiving port is connected to a second data transmitting port through an MCU, and data is transmitted from the first data receiving port to the second data transmitting port.

[0020] In one embodiment of the present invention, when performing two-wire universal asynchronous receiver and transmitter programming, the single-wire port is not in a floating state. At this time, the MCU autonomously outputs a single-wire signal according to a certain timing requirement, allowing the target chip to recognize that the programming mode this time is two-wire universal asynchronous receiver and transmitter programming.

[0021] According to another embodiment of the present invention, there is provided a system for online programming of a single-chip microcomputer, comprising:

[0022] programmer; and a signal conversion device.

[0023] According to another embodiment of the present invention, there is provided a method for online programming of a single-chip microcomputer, comprising:

[0024] Notifying the MCU of the signal conversion device through the internal firmware instruction of the programmer that the current programming mode is two-wire universal asynchronous receiver-transmitter programming or single-wire programming; and

[0025] The MCU switches the programming path according to the programming method.

[0026] In yet another embodiment of the present invention, when single-line programming is performed, when the first data receiving port needs to send data, OE is enabled, and the data is transmitted from the first data receiving port to the single-line port, and when the first data transmitting port receives data, OE is disabled, and the data is transmitted from the single-line port to the first data transmitting port;

[0027] When programming a two-wire universal asynchronous receiver and transmitter, the first data sending port is connected to the second data receiving port through the MCU, and data is transmitted from the second data receiving port to the first data sending port; the first data receiving port is connected to the second data sending port through the MCU, and data is transmitted from the first data receiving port to the second data sending port.

[0028] The signal conversion device, system and method for online programming of a single-chip microcomputer disclosed in the present invention can effectively solve the problem that existing programmers cannot burn certain specific chips.

[0029] The invention has low production cost, uses only one independently developed MCU, several common level converters and one enabling chip, and cleverly realizes the conversion of signal paths through the combination of software and hardware; compared with directly updating functions on existing programmers, the design cycle and risks are greatly reduced, and it can be quickly used in mass burning of chips.

[0030] The signal conversion device for online programming of a single-chip microcomputer of the present invention can be integrated with a programmer to form an online programming system for the single-chip microcomputer, providing a technical support for upgrading the programmer. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to further illustrate the above and other advantages and features of various embodiments of the present invention, a more specific description of various embodiments of the present invention will be presented with reference to the accompanying drawings. It will be understood that these drawings only depict typical embodiments of the present invention and are therefore not to be considered as limiting the scope thereof. In the accompanying drawings, for clarity, identical or corresponding parts will be represented by identical or similar reference numerals.

[0032] Figure 1 A schematic diagram showing the online programming method of a conventional programmer (PGM) is shown.

[0033] Figure 2 A schematic diagram showing an online programming method of a programmer PGM according to an embodiment of the present invention is shown.

[0034] Figure 3 A schematic block diagram showing the internal structure of a signal conversion device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0035] In the following description, the present invention is described with reference to various embodiments. However, those skilled in the art will recognize that various embodiments may be implemented without one or more specific details or with other replacement and / or additional methods, materials or components. In other cases, well-known structures, materials or operations are not shown or described in detail to avoid obscuring aspects of various embodiments of the present invention. Similarly, for the purpose of explanation, specific quantities, materials and configurations are set forth to provide a comprehensive understanding of embodiments of the present invention. However, the present invention may be implemented without specific details. In addition, it should be understood that the various embodiments shown in the drawings are illustrative representations and are not necessarily drawn to scale.

[0036] In this specification, reference to "one embodiment" or "the embodiment" means that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present invention. The phrase "in one embodiment" appearing in various places in this specification does not necessarily all refer to the same embodiment.

[0037] Figure 1The schematic diagram of the online programming mode of the programmer (PGM) is shown. During operation, the external power port Vext 111, ground GND 112, reset RST 113, data transmission port TXD 114, and data receiving port RXD 115 on the programmer PGM 110 are respectively connected to the corresponding power port VCC 121, ground GND 122, reset RST 123, data receiving port RXD 124, and data transmission port TXD 125 on the target chip MCU 120. The programming function is realized through the UART communication interface. That is, the data transmission port TXD 114 on the programmer PGM 110 sends data to the data receiving port RXD 124 on the target chip MCU 120, and the data receiving port RXD 115 on the programmer PGM 110 receives data from the data transmission port TXD 125 on the target chip MCU 120.

[0038] Figure 1 The programmer shown cannot complete the online programming function for some single-chip microcomputer models. For example, some single-chip microcomputers have a special online programming method designed due to application requirements, which can be programmed through the communication interface (UART) and support single-line (TOOL0) mode programming. For such special single-chip microcomputers, the present invention proposes an improved programmer.

[0039] Figure 2 FIG. 2 shows a schematic diagram of an online programming method of a programmer PGM according to an embodiment of the present invention. Figure 2 As shown, a signal conversion device 220 is connected between the programmer PGM 210 and the target chip MCU 230, that is, the UART programming signal of the programmer PGM 210 can be selected to continue programming by UART or by single-line TOOL0 after passing through the signal conversion device 220; and the program solidified in the PGM 210 can allow the signal conversion device 220 to automatically identify the programming path without additional wiring or configuration. Please note that TOOL0 is the name of the pin connected to the chip that needs single-line programming. The same name is directly used on the signal conversion device 220.

[0040] Specifically, if Figure 2As shown, the external power port Vext 211, ground GND 212, reset RST 213, data transmission port TXD 214, and data receiving port RXD 215 on the programmer PGM 210 are respectively connected to the corresponding power port 3v3 221, ground GND 222, reset input RSTIN 223, data receiving port RXD1 224, and data transmission port TXD1 225 on the signal conversion device 220. The corresponding power port VCC 241, ground GND 242, reset output RSTOUT 243, data transmission port TXD2 244, data receiving port RXD2 245 and single-line TOOL0 246 on the signal conversion device 220 are respectively connected to the corresponding power port VCC 231, ground GND 232, reset RST 233, data receiving port RXD 234, data transmission port TXD 235 and single-line TOOL0 236 on the target chip MCU 230. It should be noted that the power port 3v3 221 is only because the MCU actually used now is powered by 3.3V. If the MCU uses other voltages, it can be adaptively changed. Therefore, the power port 3v3 221 can be changed to the power port VCC.

[0041] Figure 3 FIG. 2 is a schematic block diagram showing the internal structure of a signal conversion device according to an embodiment of the present invention. Figure 3 As shown, the signal conversion device includes a PGM-IF interface 310 on the left and a target-IF interface 340 on the right. The MCU 320 is plugged into the signal conversion board. The PGM-IF interface 310 on the left is connected to the target-IF interface 340 on the right through the MCU 320. The level converters (Level Shift) 331-334 are used for switching when the voltages of the MCU 320 on the signal conversion board are different from those of the target chip.

[0042] Specifically, the PGM-IF interface 310 includes a data transmission port TXD1 311, a data reception port RXD1 312, and a reset input RSTIN 313. The target-IF interface 340 includes a data reception port RXD2 341, a data transmission port TXD2 342, a single-line TOOL0 343, and a reset output RSTOUT 344. The transmission port TXD1 311 is connected to the data reception port RXD2 341 or the single-line TOOL0 343 through the selection of the MCU 320. The data reception port RXD1 312 is connected to the data transmission port TXD2 342 or the single-line TOOL0 343 through the selection of the MCU 320. The output enable chip OE (output enable) 350 is used to enable OE 350 when the data reception port RXD1 312 needs to send data in the single-line mode, and disable OE when receiving data, so as to avoid interference in data transmission in the single-line mode. That is, the OE 350 is connected to the connection path from the data receiving port RXD1 312 to the single-line TOOL0 343. The reset input RSTIN 313 is connected to the reset output RSTOUT 344 through the MCU 320.

[0043] In a specific embodiment of the present invention, MCU 320 can be an MCU with at least two sets of UART resources, such as HC32F460 chip of Huada Semiconductor, one set of UART resources is used to receive UART signals from the programmer, and the other set is used for programming the target chip.

[0044] In a specific embodiment of the present invention, the level converters 331 - 334 are universal level conversion chips, such as chip SN74AVC24T245.

[0045] In a specific embodiment of the present invention, the enabling chip 350 may be a universal enabling chip, for example, chip 74LVC1G125.

[0046] When PGM is connected to the signal conversion device through PGM-IF to program the target chip, its internal firmware will inform the MCU of the signal conversion device whether the programming method is dual-line UART or single-line TOOL0. The MCU switches the programming path according to the programming method. Figure 3 The thick solid arrows in the figure represent the two-wire UART programming path, and the thick dotted arrows represent the single-wire TOOL0 programming path. Figure 3As shown, when two-wire UART programming is performed, the transmitting port TXD1 311 is connected to the data receiving port RXD2 341 through the MCU 320, and data is transmitted from the data receiving port RXD2 341 to the transmitting port TXD1 311; the data receiving port RXD1 312 is connected to the data transmitting port TXD2 342 through the MCU 320, and data is transmitted from the data receiving port RXD1 312 to the data transmitting port TXD2 342.

[0047] When programming the single-line TOOL0, the transmission port TXD1 311 is connected to the single-line TOOL0 343 through the MCU 320; the data receiving port RXD1 312 is connected to the single-line TOOL0 343 through the MCU 320 and the OE 350. When the data receiving port RXD1 312 needs to send data, the OE 350 is enabled, and the data is transmitted from the data receiving port RXD1 312 to the single-line TOOL0 343. When the transmission port TXD1 311 receives data, the OE is disabled, and the data is transmitted from the single-line TOOL0 343 to the transmission port TXD1 311.

[0048] When two-wire UART programming is performed, TOOL0 343 is not in a floating state. At this time, MCU 320 will autonomously output TOOL0 signal according to certain timing requirements to allow the target chip to recognize that the programming mode this time is two-wire universal asynchronous receiver and transmitter programming.

[0049] This functional requirement for TOOL0 in dual-line mode is the reason why existing programmers cannot directly burn certain chips, because existing programmers cannot provide TOOL0 signals to the outside.

[0050] When programming single-line TOOL0, the internal MCU of the signal conversion device switches to the corresponding path, and then the received UART signal is converted into a single line through the hardware combination of the external level converter and the OE logic chip. At this time, the two-line UART path is not used, and the entire burning process is implemented by TOOL0 in half-duplex form.

[0051] The signal conversion device, system and method for online programming of a single-chip microcomputer disclosed in the present invention can effectively solve the problem that existing programmers cannot burn certain specific chips.

[0052] The invention has low production cost, uses only one independently developed MCU, several common level converters and one enabling chip, and cleverly realizes the conversion of signal paths through the combination of software and hardware; compared with directly updating functions on existing programmers, the design cycle and risks are greatly reduced, and it can be quickly used in mass burning of chips.

[0053] The signal conversion device for online programming of a single-chip microcomputer of the present invention can be integrated with a programmer to form an online programming system for the single-chip microcomputer, providing a technical support for upgrading the programmer.

[0054] Although various embodiments of the present invention are described above, it should be understood that they are presented as examples only and not as limitations. It is obvious to those skilled in the relevant art that various combinations, modifications and changes can be made thereto without departing from the spirit and scope of the present invention. Therefore, the breadth and scope of the present invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should only be defined according to the attached claims and their equivalents.

Claims

1. A signal conversion device for online programming of a single-chip microcomputer, comprising: A programmer interface, the programmer interface is connected to an external programmer; A target chip interface, wherein the target chip interface is connected to a target chip that needs to be programmed online; An MCU is arranged between the programmer interface and the target chip interface, and a two-wire universal asynchronous receiver-transmitter programming signal received from the programmer through the programmer interface is selected by the MCU to perform two-wire universal asynchronous receiver-transmitter programming or single-wire programming on the target chip; as well as A level converter, the level converter is arranged between the MCU and the target chip interface, and the level converter is used to convert the voltage of the MCU or the target chip, The programmer interface includes a first data transmission port, a first data receiving port and a reset input. The target chip interface includes a second data receiving port, a second data sending port, a single-line port and a reset output, The first data transmission port is connected to the second data receiving port or the single-line port through the selection of the MCU. The first data receiving port is connected to the second data sending port or the single-line port through the selection of the MCU. The reset input is connected to the reset output through the MCU. It also includes an output enable chip OE, which is connected to the connection path from the first data receiving port to the single-line port. During single-line programming, when the first data receiving port needs to send data, OE is enabled, and when receiving data, OE is disabled. When single-line programming is performed, the first data sending port is connected to the single-line port through the MCU; the first data receiving port is connected to the single-line port through the MCU and the OE. When the first data receiving port needs to send data, OE is enabled and the data is transmitted from the first data receiving port to the single-line port. When the first data sending port receives data, OE is disabled and the data is transmitted from the single-line port to the first data sending port.

2. The signal conversion device for single-chip microcomputer online programming as claimed in claim 1, characterized in that: When programming the two-wire universal asynchronous receiver / transmitter, the first data transmission port is connected to the second data reception port through the MCU, and data is transmitted from the second data reception port to the first data transmission port; The first data receiving port is connected to the second data sending port through the MCU, and data is transmitted from the first data receiving port to the second data sending port.

3. The signal conversion device for single-chip microcomputer online programming as claimed in claim 2, characterized in that: When programming the two-wire universal asynchronous receiver and transmitter, the single-wire port is not in a floating state. At this time, the MCU autonomously outputs a single-wire signal according to certain timing requirements, allowing the target chip to recognize that the programming mode this time is two-wire universal asynchronous receiver and transmitter programming.

4. A system for online programming of a single-chip microcomputer, comprising: Programmer; as well as The signal conversion device according to any one of claims 1 to 3.

5. A method for online programming of a single-chip microcomputer, comprising: The internal firmware instruction of the programmer notifies the MCU of the signal conversion device that the current programming mode is two-wire universal asynchronous receiver-transmitter programming or single-wire programming; as well as MCU switches programming paths according to programming methods. When single-line programming is performed, when the first data receiving port needs to send data, OE is enabled, and the data is transmitted from the first data receiving port to the single-line port; when the first data sending port receives data, OE is disabled, and the data is transmitted from the single-line port to the first data sending port; When programming the two-wire universal asynchronous receiver / transmitter, the first data transmission port is connected to the second data reception port through the MCU, and data is transmitted from the second data reception port to the first data transmission port; The first data receiving port is connected to the second data sending port through the MCU, and data is transmitted from the first data receiving port to the second data sending port.

Citation Information

Patent Citations

  • Programming device based on MSP430 single chip microcomputer

    CN108090023A

  • Signal conversion device and system for online programming of single-chip microcomputer

    CN211718737U