WO2008098426A1 - Hand held single chip microcomputer programmer - Google Patents

Hand held single chip microcomputer programmer Download PDF

Info

Publication number
WO2008098426A1
WO2008098426A1 PCT/CN2007/000798 CN2007000798W WO2008098426A1 WO 2008098426 A1 WO2008098426 A1 WO 2008098426A1 CN 2007000798 W CN2007000798 W CN 2007000798W WO 2008098426 A1 WO2008098426 A1 WO 2008098426A1
Authority
WO
WIPO (PCT)
Prior art keywords
programmer
programming
interface
circuit
handheld
Prior art date
Application number
PCT/CN2007/000798
Other languages
French (fr)
Chinese (zh)
Inventor
Fangrui Mou
Hongkai Ge
Original Assignee
Shenzhen Secom Telecom Co., Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Secom Telecom Co., Ltd filed Critical Shenzhen Secom Telecom Co., Ltd
Publication of WO2008098426A1 publication Critical patent/WO2008098426A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/76Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in application-specific integrated circuits [ASIC] or field-programmable devices, e.g. field-programmable gate arrays [FPGA] or programmable logic devices [PLD]
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23406Programmer device, portable, handheld detachable programmer

Definitions

  • This invention relates to programmers and, more particularly, to a handheld microcontroller (MCU) programmer.
  • MCU microcontroller
  • the invention solves the problems that the prior programmer batch programming is inconvenient, bulky, requires computer participation in the programming process, and needs to install special software on the computer, and provides a small size, low cost, password protection function and encryption and decryption function. Independently programmable programmer.
  • the technical solution of the present invention is to construct a handheld MCU programmer, comprising a programmer body and a programmer handle body, the programmer body comprising a voltage stabilization circuit, a CPU main control unit, and a communication interface connected with the CPU main control unit And a programming interface, the programmer handle body includes a socket for connecting the programming interface and a plurality of pogo pins for connecting the target board, wherein:
  • the programmer body further includes a password protection module and an encryption and decryption module, and the password protection
  • the module is for limiting the number of programming
  • the encryption and decryption module is for encrypting and decrypting the programming file
  • the plurality of pogo pins includes a long needle for the ground wire that first contacts the target board.
  • a programming interface selection circuit is further included, and the programming interface selection circuit cooperates with the programming interface to implement switching of a programming interface type.
  • the DIP dial switch is used to control the programming interface selection circuit.
  • the plurality of pogo pins are plug-in spring pins, which can be inserted into a double row ten needle, a single row five needle or a single row three needle.
  • the power supply mode selection circuit is further included, and the power supply mode selection circuit cooperates with the voltage stabilization circuit to switch the power supply mode.
  • the input end of the voltage stabilizing circuit is connected to an external power source or an internal battery, and the output terminal supplies power to the programmer body.
  • the input end of the voltage stabilizing circuit is connected to an external power source or an internal battery, and the output terminal supplies power to the programmer body and the target board.
  • the target board supplies power to the programmer body.
  • the power supply mode selection circuit is controlled using a DIP dial switch.
  • the programmer body further includes a program mode selection module for switching between a manual programming mode and an automatic programming mode.
  • the programmer body further includes a programming button and a reset button connected to the CPU main control unit, the programming button is used for manual programming, and the reset button circuit is used for resetting the CPU main control unit.
  • the programmer body further includes the program content selection circuit, and the program content includes a program target board and an erase target board.
  • the programming content selection circuit is controlled using a DIP dial switch.
  • the programming interface of the programmer body is connected to a flat cable, and the other end of the flat cable is used to connect a socket or a target board of the programmer handle.
  • the programmer body further includes an indication and alarm circuit for indicating the working state of the programmer, the indication and alarm circuit includes two LED lights and a buzzer, wherein one LED is used for indicating During the programming process, another LED light is used in conjunction with the buzzer to indicate if the programming was successful.
  • the programming interface further includes a protection circuit, and the protection circuit can realize the instant State suppression protection and overcurrent protection.
  • the communication interface is an RS232 serial interface
  • the CPU main control unit uses a single chip C8051F123
  • the programming interface is a switchable C2/JTAG interface
  • the programmer body is connected to a computer through a communication interface circuit. To initialize.
  • the programmer of the present invention has an encryption and decryption module and a password protection module, which can encrypt and decrypt the programming file and limit the number of programming;
  • the target board is programmed by the programmer handle body, and the target board of the plurality of interfaces is supported; It is carried out through the computer's HyperTerminal at the time of initialization. It does not need to install special software on the computer. It does not require the participation of the computer during the programming process, and is convenient to use and suitable for mass programming.
  • m 1 is a functional block diagram of a programmer body in a preferred embodiment of the present invention.
  • FIG. 2 is a schematic diagram of the appearance of a programmer body in a preferred embodiment of the present invention.
  • FIG. 3 is a schematic block diagram of a programmer handle body mated with the programmer body shown in FIG. 1;
  • FIG. 5 is a circuit diagram of a programmer body in a preferred embodiment of the present invention.
  • FIG. 6 is a circuit diagram of a programmer handle in a preferred embodiment of the present invention.
  • the programmer of the present invention includes a programmer body and a programmer handle. A preferred embodiment of the invention is illustrated in Figures 1 through 6.
  • 1 is a schematic block diagram of the programmer body 10
  • FIG. 2 is a schematic diagram of the appearance of the programmer body 10
  • FIG. 3 is a schematic block diagram of the programmer body 30.
  • the programmer body 10 includes a voltage stabilizing circuit 11, a CPU main control unit 12, a communication interface 13, a programming interface 14, a power supply mode selection circuit 15, a programming interface selection circuit 16, and a programming content selection circuit. 17.
  • the communication interface 13 is connected to the CPU main control unit 12 and communicates with the computer; the programming interface 14 is connected to the CPU main control unit 12 to form a programming interface circuit;
  • the protection circuit can realize the transient suppression protection and the overcurrent protection;
  • the power supply mode selection circuit 15 is directly connected to the CPU main control unit 12, and cooperates with the voltage stabilization circuit 11 to realize the switching of the power supply mode;
  • the programming interface selection circuit 16 Directly connected to the CPU main control unit 12, cooperate with the programming interface 14 to realize switching of the programming interface type;
  • the programming content selection circuit 17 is directly connected to the CPU main control unit 12, for selecting a programming target board or erasing a target board;
  • the protection module 18 is used to limit the number of programming, and the encryption and decryption module 19 is used to encrypt and decrypt the programming file.
  • the programming mode selection module is directly connected to the CPU main control unit 12 for switching between the manual programming mode and the automatic programming mode.
  • the "power supply mode” includes: the voltage stabilizing circuit 11 supplies power to the programmer body 10, and the other power supplies supply power to the hundred standard boards; the voltage stabilizing circuit 11 supplies power to the programmer body 10 and the target board; the target board supplies power to the programmer body 10, For example, the target board powers the programmer body 10 through a programming cable or programmer handle.
  • This kind of power supply method is very flexible to adapt to various power supply situations at the programming site.
  • the automatic programming mode is to insert the programmer handle body into the target board programming hole to realize programming;
  • the manual programming mode is to connect the programming cable or the programmer handle body to the target board programming interface, and then press the programming button to realize the programming. program.
  • the voltage stabilizing circuit 11 is a DC DC+LDO voltage stabilizing circuit, and its input terminal can be connected to an internal battery or connected to an external power source.
  • the voltage stabilizing circuit the input end of the 11 can pass the 9V DC.
  • the power input port is connected to an external 220VAC/9VDC power adapter; the output terminal supplies power to the programmer body 10 or simultaneously supplies power to the target board.
  • the CPU main control unit 12 uses a single chip microcomputer C8051F123.
  • the communication interface 13 is an RS232 serial interface that can be used to connect to a computer for initialization.
  • Programming interface 14 is a C2/JTAG programming interface that can be switched to a C2 interface or a JTAG programming interface.
  • the programming interface 14 can be connected to a flat cable and the target board having the corresponding interface can be programmed through the flat cable, or the other end of the flat cable can be connected to the programmer handle 30 (Fig. 3) and then through the programmer handle 30 to the target board. Programming.
  • the programmer body 10 can be connected to the computer through the RS232 communication interface 13, and the CPU main control unit 12 has a UART port connected to the RS232 communication interface 13.
  • the HyperTerminal uses the HyperTerminal to enter the programmer initialization operation menu to initialize the programmer, no need to install other special software.
  • Initialization includes selecting the target device, erasing the programmer data storage space, receiving the user HEX file, setting the programmer password, setting the programming mode (manual programming or automatic programming), online operation, and so on.
  • the password protection module 18 and the encryption decryption module 19 can be implemented by hardware, firmware or software. For example, at the time of initialization, the user password can be set in the field of receiving the HEX file.
  • the user enters the user's password when using the programmer.
  • the password protection module 18 compares the password input by the user and the password set by the HEX file. If the two are consistent, the user is considered to be an authorized user, and the programmer is allowed to run according to the user password including the programmed quantity, the programming date, the programmer number, and the like.
  • the encryption security module 19 is used to encrypt and decrypt user passwords, programming files, etc., to implement the encryption and decryption mode to transfer the programmed file, and to encrypt and decrypt the file in the programmer, thereby enhancing confidentiality. That is to say, the number of programs and the secret programming file can be limited by the password protection module 18 and the encryption/decryption module 19.
  • the programming mode selection module can be implemented in hardware, or software.
  • the programming mode selection module is implemented in a software manner, and during the initialization process of the programmer, an automatic programming mode or a manual programming mode may be selected through an initialization menu.
  • the programmer body 10 also includes a programming button 26 and a reset button circuit 25, as shown in FIG.
  • the programming button 26 and the reset button circuit 25 are directly connected to the CPU main control unit 12.
  • the programming button 26 is used for manual programming, and the programming operation is performed once per trigger; the reset button 25 is used to reset the CPU main control unit 12. '
  • the DIP switch switch 23 controls the power supply mode selection circuit 15, the programming interface selection circuit 16, and the programming content selection circuit 17.
  • the DIP DIP switch is a 6-digit DIP DIP switch, the 1st and 2nd bits set the power supply mode, the 5th bit selects the target board interface such as C2 or JTAG interface, and the 3rd and 4th bits set the programming target board or erase target.
  • the output of the voltage stabilizing circuit 11 can be connected to the first bit of the 6-bit DIP switch, and the target board can supply power to the internal circuit of the programmer, that is, the target board can be programmed by the programming cable or the programmer handle 30.
  • the body 10 is powered.
  • This embodiment uses two LED status indicators 28 and one alarm 24, one of which is LED
  • the lamp indicates the programming process and flashes at a frequency lower than or equal to 10 Hz during programming.
  • Another LED is used to indicate the programming result.
  • the programming succeeds in flashing at 1Hz.
  • the buzzer emits two consecutive "beep”sounds; the programming error flashes at 5Hz, and the buzzer emits a "beep” tone. , lasts 3 seconds.
  • the position of the LED, the buzzer and the button can be appropriately adjusted.
  • the programmer handle 30 includes a socket 31 and a plurality of pogo pins 32.
  • the socket 31 can be a double row ten pin socket such as a conventional ten pin socket having a pitch of 2.54 mm, and a programming interface 14 for connecting the programmer body 10, for example, a programming cable 14 via a ten-pin flat cable.
  • the plurality of pogo pins 32 may be a double row ten needle, a single row five needle or a single row three needle or the like.
  • the plurality of pogo pins 32 are plug-in spring pins that can be plugged into a double-row cross, a single-row five-pin or a single-row three-pin programming head, and the flexible programming head can be programmed with a double row of ten Needle interface / single-row five-pin interface / single-row three-pin interface target board.
  • the plurality of pogo pins 32 are long and short needle designs, gp, having a long needle for the ground wire that first contacts the target plate.
  • the programmer of this embodiment requires the computer to participate in initialization only before programming, and once the initialization is completed, the participation of the computer is no longer required.
  • the programmer can automatically or manually program the target board either independently or in conjunction with the programmer handle.
  • FIG. 5 is a circuit diagram of the programmer body.
  • the DC/DC U3 input terminal of the voltage stabilizing circuit is connected to the positive terminal of the 9 VDC power input port P1 and the battery BT1 through the power fuse F4.
  • DC/DC output 5V to the input of LDO U4.
  • the LDO U4 regulates the output 4V, which is stepped down to 3.3V through diode D7 and connected to power switch S4.
  • the other end of the power switch is connected to 3.3V to the internal working power supply of the programmer. This allows the programmer to be powered by a 220VAC/9VDC power adapter or by an internal battery.
  • the cathode of the diode D7 is also connected to the bitl bit of the DIP switch S2, and is connected to the working power supply of the target board through the bitl bit.
  • the power of the target board can be introduced into the working power of the programmer, so that the target board supplies power to the programmer.
  • Set the bit 2 of the DIP switch S2 to ON, indicating that the target board needs the programmer to supply power.
  • the CPU obtains this flag bit, controls the MOS transistor Q1, and sends the programmer power to the target board working power supply, thereby implementing the programmer to supply power to the target board.
  • the above is the power supply mode of the programmer.
  • the DIP switch in addition to setting the power supply mode, the DIP switch also sets the programming interface, programming content such as programming target board or erasing the target board.
  • Bit5 selects the programming interface
  • OFF is the C2 interface
  • ON is the JTAG interface.
  • Bit3 and bit4 select the programming target board or erase the target board.
  • Pins Pin 8, 9, 10, 11 of the DIP switch are connected to the corresponding 10 ports of CPU U1 in Figure 4, and the CPU performs the corresponding operations through the state of these IOs.
  • the button S3 in Figure 5 is a manual programming button, and the button change pin is connected to the external interrupt pin in the CPU of Figure 4. Press S3 once to generate an interrupt on the CPU and perform a programming operation.
  • This is the manual programming process.
  • Manual programming or automatic programming is set in the menu when the programmer is initialized by the computer. When automatic programming is selected, the external interrupt is turned off in the program, and the manual change to the button does not work.
  • the CPU polls the target board in-position signal /C20N (Pin33), and if the target board is in place, the program operation is performed, otherwise it is not executed. This is the automatic programming process.
  • the CPU is connected to the RS232 level conversion chip U2 in Figure 5 via the 2-wire CPU UART interface (54, 55 'pin), and the U2 is connected to the standard serial port DB9.: Thereby connected to the serial port of the computer, the programmer is initialized on the computer through the HyperTerminal.
  • D9 is the working power indicator. Turn on the power switch S4 in Figure 5.
  • D11 is the programming process indicator. During the programming process, the lamp flashes rapidly at a frequency lower than or equal to 10Hz. If the lamp is off, it indicates that the programming process is wrong. The programming is successful. The lamp is always on; D5 is the programming result indicator. This light is always on during programming, programming is successful, this light flashes at 1Hz frequency, programming error, this light flashes at 5Hz frequency. Buzzer U30 uses sound to indicate programming results.
  • the master CPU of the programmer is C8051F123 U1.
  • C8051F123 has a rich 10 ports, and has up to 128KB of Flash Memory inside. Its system working frequency can be Arrived at 100 MIPS.
  • the CPU is connected to the peripheral circuit through 10 ports, obtains the dial setting, controls the power supply mode, connects the RS232 communication interface circuit, and connects the programming interface circuit to realize the core control of all functions of the programmer.
  • the double-row ten-pin socket JP3 is the programming interface.
  • the standard JTAG signal and C2 signal are defined on JP3.
  • the programmer connects to the target board through this interface to complete the programming work.
  • the standard JTAG signal and C2 signal are provided by the CPU's IO port (pages 33, 34, 35, 36, 37).
  • the signal on pin 3 of JP3 is the in-position signal, and this signal is grounded on the target board.
  • the CPU detects this signal by pin 33 to determine whether the target board is in position. In the automatic programming mode, the CPU also performs automatic programming by polling this signal.
  • Double-row ten-pin socket JP3 can be connected to a 10-pin flat cable.
  • the other end of the cable can be connected to a target board with a corresponding interface or a socket to which the programmer handle is connected.
  • password protection and encryption and decryption protection are designed for the operation of the programmer.
  • the user connects the programmer to the HyperTerminal of the computer and initializes the programmer through the menu options on the HyperTerminal. Initialization includes selecting the target device, erasing the programmer's flash space, receiving user HEX files, and online programming.
  • the user password is set in the column of receiving HEX file, and the user must input the correct password to receive the HEX file into the programmer.
  • the password protection module can be used to determine if the password entered by the user is correct.
  • the user password contains information such as the number of programming, programming date, programmer number, and so on.
  • the encryption security protection module is used to encrypt and decrypt user passwords, programmed files, etc., and increases confidentiality.
  • FIG 6 is a schematic diagram of a programmer handle mated with the programmer.
  • the socket 31 is a conventional double-row ten-pin socket connected to the programmer programming interface (JP3 in Fig. 4) through a ten-pin flat cable;
  • J1 is a double-row ten-pin pluggable spring pin.
  • the third pin of the spring pin on J1 is a long needle that is connected to the target plate. Ground wire, this ensures that the signal connected to the target board is connected first for hot swapping.
  • the pogo pins can be disassembled into a single row of five needles (leaving 1, 3, 5, 7, 9 needles) and a single row of three needles (leaving 1, 3, 5 needles).
  • Single-row five-pin and single-row three-pin are used to program the C2 interface target board because the C2 interface has only two lines of clock and data.
  • the single-row five-pin and single-row three-pin design saves PCB space on the target board.
  • the spring pin has another great advantage: the user can automatically program by holding the top of the programmer handle on the target programming hole.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

A hand held single chip microcomputer programmer is provided, and includes a programmer body and a programmer handlebody. The programmer body includes a voltage stabilizing circuit, a CPU central control unit, a communication interface and a programming interface which are connected with the CPU central control unit, the programmer handlebody includes socket for connecting with the programming interface and a plurality of spring pins for connecting with a object board, in which, the programmer body also comprises a password protecting module and an encryption/decryption module, the password protecting module limits the times of programming, the encryption/decryption module encrypts and decrypts the programming file, the spring pins includes a long pin connected with ground wire of the object board firstly. The programmer has advantages of encrypting/decrypting the programming file and limiting the number of programming, without the computer being concerned during programming, with flexible programming interface, providing many power supply modes, convenient for usage and suitable for bulk programming.

Description

手持式单片机编程器  Handheld microcontroller programmer
技术领域 Technical field
本发明涉及编程器, 更具体地说, 涉及一种手持式单片机(MCU) 编程 器。 背景技术  This invention relates to programmers and, more particularly, to a handheld microcontroller (MCU) programmer. Background technique
单片机以其结构简单、 使用灵活、 易于掌握等特点, 在工业控制、 消费 电子、 通信等领域得到大面积的推广。 但是随着单片机的大量使用,;越来越 多的用户受到单片机大批量编程问题的困扰。 目前单片机批量编程主要有两 种方式。 一种是离系统编程, 也就是将单片机用编程器烧写好程序后再焊到 目标板上。 就这种编程方法而言有如下缺点: 不利于单片机程序更新; 现有 编程器价格昂贵、 体积庞大。 另外一种是在系统编程, 也就是将单片机安装 到目标板上后再编程。 就这种编程方法而言也有如下缺点: 编程过程中需要 计算机的参与; 需要在计算机上安装专用软件; 编程头结构固定, ,不能灵活 使用; 以上缺点使得单片机量产编程极其不方便, 影响产品生产进度。 发明内容  With its simple structure, flexible use and easy to master, MCU has been widely promoted in the fields of industrial control, consumer electronics and communication. However, with the large-scale use of single-chip microcomputers, more and more users are troubled by the large-volume programming problems of single-chip microcomputers. At present, there are two main methods for batch programming of single-chip microcomputers. One is to program from the system, that is, to program the microcontroller with a programmer and then solder it to the target board. As far as this programming method is concerned, it has the following disadvantages: It is not conducive to the update of the microcontroller program; the existing programmer is expensive and bulky. The other is to program in the system, that is, after installing the microcontroller on the target board. As far as this programming method is concerned, it also has the following disadvantages: The participation of the computer is required in the programming process; the special software needs to be installed on the computer; the programming header structure is fixed, and cannot be flexibly used; the above disadvantages make the mass production programming of the single chip extremely inconvenient, affecting the product production progress. Summary of the invention
本发明要解决现有编程器批量编程不方便、 体积庞大、 编程过程中需要 计算机参与以及需要在计算机上安装专用软件等问题, 提供一种体积小、 成 本低、 具有口令保护功能和加密解密功能的可独立编程的编程器。  The invention solves the problems that the prior programmer batch programming is inconvenient, bulky, requires computer participation in the programming process, and needs to install special software on the computer, and provides a small size, low cost, password protection function and encryption and decryption function. Independently programmable programmer.
本发明的技术方案是, 构造一种手持式单片机编程器, 包括编程器本体 和编程器柄体, 所述编程器本体包括稳压电路、 CPU主控单元、与 CPU主控单 元连接的通信接口和编程接口, 所述编程器柄体包括用于连接所述编程接口 的插座和用于连接目标板的多根弹簧针, 其中:  The technical solution of the present invention is to construct a handheld MCU programmer, comprising a programmer body and a programmer handle body, the programmer body comprising a voltage stabilization circuit, a CPU main control unit, and a communication interface connected with the CPU main control unit And a programming interface, the programmer handle body includes a socket for connecting the programming interface and a plurality of pogo pins for connecting the target board, wherein:
所述编程器本体还包括口令保护模块以及加密解密模块, 所述口令保护 模块用于限制编程次数, 所述加密解密模块用于加密和解密编程文件; 所述多根弹簧针包括一根用于最先接触目标板的地线的长针。 The programmer body further includes a password protection module and an encryption and decryption module, and the password protection The module is for limiting the number of programming, the encryption and decryption module is for encrypting and decrypting the programming file; the plurality of pogo pins includes a long needle for the ground wire that first contacts the target board.
在本发明中, 还包括编程接口选择电路, 所述编程接口选择电路与所述 编程接口配合实现编程接口类型的切换。  In the present invention, a programming interface selection circuit is further included, and the programming interface selection circuit cooperates with the programming interface to implement switching of a programming interface type.
在本发明中, 使用 DIP拨码开关来控制所述编程接口选择电路。  In the present invention, the DIP dial switch is used to control the programming interface selection circuit.
在本发明中, 所述多根弹簧针为插拔式弹簧针, 可插拔成双排十针、 单 排五针或单排三针。  In the present invention, the plurality of pogo pins are plug-in spring pins, which can be inserted into a double row ten needle, a single row five needle or a single row three needle.
在本发明中, 还包括供电方式选择电路, 所述供电方式选择电路与所述 稳压电路配合实现供电方式的切换。  In the present invention, the power supply mode selection circuit is further included, and the power supply mode selection circuit cooperates with the voltage stabilization circuit to switch the power supply mode.
在本发明中, 所述稳压电路的输入端与外部电源或内部电池连接, 输出 端给所述编程器本体供电。  In the present invention, the input end of the voltage stabilizing circuit is connected to an external power source or an internal battery, and the output terminal supplies power to the programmer body.
在本发明中, 所述稳压电路的输入端与外部电源或内部电池连接, 输出 端给所述编程器本体以及目标板供电。  In the present invention, the input end of the voltage stabilizing circuit is connected to an external power source or an internal battery, and the output terminal supplies power to the programmer body and the target board.
在本发明中, 目标板给所述编程器本体供电。  In the present invention, the target board supplies power to the programmer body.
在本发明中, 使用 DIP拨码开关来控制所述供电方式选择电路。  In the present invention, the power supply mode selection circuit is controlled using a DIP dial switch.
在本发明中, 所述编程器本体还包括用于切换手动编程方式和自动编程 方式的编程方式选择模块。 ·  In the present invention, the programmer body further includes a program mode selection module for switching between a manual programming mode and an automatic programming mode. ·
在本发明中, 所述编程器本体还包括与 CPU主控单元连接的编程按键和 复位按键, 编程按键用于手动编程, 复位按键电路用于复位 CPU主控单元。  In the present invention, the programmer body further includes a programming button and a reset button connected to the CPU main control unit, the programming button is used for manual programming, and the reset button circuit is used for resetting the CPU main control unit.
在本发明中, 所述编程器本体还包括所述编程内容选择电路, 所述编程 内容包括编程目标板和擦除目标板。  In the present invention, the programmer body further includes the program content selection circuit, and the program content includes a program target board and an erase target board.
在本发明中, 使用 DIP拨码开关控制所述编程内容选择电路。  In the present invention, the programming content selection circuit is controlled using a DIP dial switch.
在本发明中, 所述编程器本体的编程接口连接一扁平电缆, 所述扁平电 缆的另一端用于连接所述编程器柄体的插座或者目标板。  In the present invention, the programming interface of the programmer body is connected to a flat cable, and the other end of the flat cable is used to connect a socket or a target board of the programmer handle.
在本发明中, 所述编程器本体还包括用于指示编程器工作状态的指示与 告警电路,所述指示与告警电路包括两个 LED灯和一个蜂鸣器,其中一个 LED 灯以用于指示编程过程, 另一个 LED灯与蜂鸣器配合用于指示编程是否成功。  In the present invention, the programmer body further includes an indication and alarm circuit for indicating the working state of the programmer, the indication and alarm circuit includes two LED lights and a buzzer, wherein one LED is used for indicating During the programming process, another LED light is used in conjunction with the buzzer to indicate if the programming was successful.
本发明中, 所述编程接口还包括保护电路, 通过该保护电路能够实现瞬 态抑制保护和过流保护。 In the present invention, the programming interface further includes a protection circuit, and the protection circuit can realize the instant State suppression protection and overcurrent protection.
在本发明中, 所述通信接口为 RS232串行接口, 所述 CPU主控单元采用 单片机 C8051F123, 所述编程接口为可切换的 C2/JTAG接口, 所述编程器本 体通过通信接口电路与计算机连接以进行初始化。  In the present invention, the communication interface is an RS232 serial interface, the CPU main control unit uses a single chip C8051F123, the programming interface is a switchable C2/JTAG interface, and the programmer body is connected to a computer through a communication interface circuit. To initialize.
由上述技术方案可知, 本发明所述的编程器具有加密解密模块和口令保 护模块, 能够加密解密编程文件和限制编程数量; 通过编程器柄体来编程目 标板, 支持多种接口的目标板; 在初始化之时通过计算机的超级终端进行, 不需要在计算机上安装专用软件; 在编程过程中无需计算机的参与, 使用方 便, 适合大批量编程。  According to the above technical solution, the programmer of the present invention has an encryption and decryption module and a password protection module, which can encrypt and decrypt the programming file and limit the number of programming; the target board is programmed by the programmer handle body, and the target board of the plurality of interfaces is supported; It is carried out through the computer's HyperTerminal at the time of initialization. It does not need to install special software on the computer. It does not require the participation of the computer during the programming process, and is convenient to use and suitable for mass programming.
附图说明 下面将结合附图及实施例对本发明作进一步说明, 附图中: BRIEF DESCRIPTION OF THE DRAWINGS The invention will be further described with reference to the accompanying drawings and embodiments in which:
m 1是本发明一个优选实施例中编程器本体的原理框图;  m 1 is a functional block diagram of a programmer body in a preferred embodiment of the present invention;
图 2是本发明一个优选实施 ί列中的编程器本体的外观示意图;  2 is a schematic diagram of the appearance of a programmer body in a preferred embodiment of the present invention;
图 3是与图 1所示编程器本体配合的编程器柄体的原理框图;  3 is a schematic block diagram of a programmer handle body mated with the programmer body shown in FIG. 1;
图 4, 图 5是本发明一个优选实施例中的编程器本体的电路图;  4, FIG. 5 is a circuit diagram of a programmer body in a preferred embodiment of the present invention;
图 6是本发明一个优选实施例中的编程器柄体的电路图。 具体实施方式 本发明的编程器包括编程器本体和编程器柄体。 本发明的一个优选实施 例如图 1至图 6所示。 其中, 图 1为编程器本体 10的原理框图, 图 2为编程 器本体 10的外观示意图, 图 3为编程器柄体 30的原理框图。  Figure 6 is a circuit diagram of a programmer handle in a preferred embodiment of the present invention. DETAILED DESCRIPTION The programmer of the present invention includes a programmer body and a programmer handle. A preferred embodiment of the invention is illustrated in Figures 1 through 6. 1 is a schematic block diagram of the programmer body 10, FIG. 2 is a schematic diagram of the appearance of the programmer body 10, and FIG. 3 is a schematic block diagram of the programmer body 30.
如图 1和图 2所示,在编程器本体 10包括稳压电路 11、 CPU主控单元 12、 通信接口 13、 编程接口 14、 供电方式选择电路 15、 编程接口选择电路 16、 编程内容选择电路 17、 口令保护模块 18、 加密解密模块 19以及编程方式选 择模块。 其中, 通信接口 13连接到 CPU主控单元 12, 并与计算机进行通信; 编程接口 14连接到 CPU主控单元 12, 形成编程接口电路; 编程接口 14还包 括保护电路, 通过该保护电路能够实现瞬态抑制保护和过流保护; 供电方式 选择电路 15直接与 CPU主控单元 12相连, 与稳压电路 11配合实现供电方式 的切换; 编程接口选择电路 16直接与 CPU主控单元 12相连, 与编程接口 14 配合实现编程接口类型的切换; 所述编程内容选择电路 17直接与 CPU主控单 元 12相连, 用于选择编程目标板或擦除目标板; 口令保护模块 18用于限制 编程次数, 加密解密模块 19用于加密和解密编程文件; 所述编程方式选择模 块直接与 CPU主控单元 12相连, 用于切换手动编程方式和自动编程方式。 As shown in FIG. 1 and FIG. 2, the programmer body 10 includes a voltage stabilizing circuit 11, a CPU main control unit 12, a communication interface 13, a programming interface 14, a power supply mode selection circuit 15, a programming interface selection circuit 16, and a programming content selection circuit. 17. A password protection module 18, an encryption and decryption module 19, and a programming mode selection module. The communication interface 13 is connected to the CPU main control unit 12 and communicates with the computer; the programming interface 14 is connected to the CPU main control unit 12 to form a programming interface circuit; The protection circuit can realize the transient suppression protection and the overcurrent protection; the power supply mode selection circuit 15 is directly connected to the CPU main control unit 12, and cooperates with the voltage stabilization circuit 11 to realize the switching of the power supply mode; the programming interface selection circuit 16 Directly connected to the CPU main control unit 12, cooperate with the programming interface 14 to realize switching of the programming interface type; the programming content selection circuit 17 is directly connected to the CPU main control unit 12, for selecting a programming target board or erasing a target board; The protection module 18 is used to limit the number of programming, and the encryption and decryption module 19 is used to encrypt and decrypt the programming file. The programming mode selection module is directly connected to the CPU main control unit 12 for switching between the manual programming mode and the automatic programming mode.
所述 "供电方式"包括: 稳压电路 11给编程器本体 10供电, 其他电源 给百标板供电; 稳压电路 11给编程器本体 10和目标板供电; 目标板给编程 器本体 10供电,例如, 目标板通过编程电缆或者编程器柄体给编程器本体 10 供电。 这样的供电方式非常灵活的适应编程现场的各种供电情况。  The "power supply mode" includes: the voltage stabilizing circuit 11 supplies power to the programmer body 10, and the other power supplies supply power to the hundred standard boards; the voltage stabilizing circuit 11 supplies power to the programmer body 10 and the target board; the target board supplies power to the programmer body 10, For example, the target board powers the programmer body 10 through a programming cable or programmer handle. This kind of power supply method is very flexible to adapt to various power supply situations at the programming site.
所述自动编程方式是将所述编程器柄体插入目标板编程孔即可实现编 程; 所述手动编程方式是将编程电缆或者编程器柄体连接到目标板编程接口 后按下编程按钮实现一次编程。  The automatic programming mode is to insert the programmer handle body into the target board programming hole to realize programming; the manual programming mode is to connect the programming cable or the programmer handle body to the target board programming interface, and then press the programming button to realize the programming. program.
在本实施例中,稳压电路 11为 DC DC+LDO的稳压电路,其输入端可与 内部电池相连, 或者与外部电源连接, 例如,稳压电路: 11的输入端可通过 9V 的 DC电源输入口与外部 220VAC/9VDC电源适配器相连; 其输出端给编程器本 体 10供电,或者同时给目标板供电。 CPU主控单元 12采用单片机 C8051F123。 通信接口 13为 RS232串行接口, 可用于连接计算机以进行初始化。 编程接口 14为 C2/JTAG编程接口,可切换到 C2接口或 JTAG编程接口。编程接口 14可 连接扁平电缆并通过该扁平电缆对具有相应接口的目标板进行编程, 也可以 让扁平电缆的另一端连接编程器柄体 30 (图 3 )再通过编程器柄体 30对目标 板进行编程。 In this embodiment, the voltage stabilizing circuit 11 is a DC DC+LDO voltage stabilizing circuit, and its input terminal can be connected to an internal battery or connected to an external power source. For example, the voltage stabilizing circuit : the input end of the 11 can pass the 9V DC. The power input port is connected to an external 220VAC/9VDC power adapter; the output terminal supplies power to the programmer body 10 or simultaneously supplies power to the target board. The CPU main control unit 12 uses a single chip microcomputer C8051F123. The communication interface 13 is an RS232 serial interface that can be used to connect to a computer for initialization. Programming interface 14 is a C2/JTAG programming interface that can be switched to a C2 interface or a JTAG programming interface. The programming interface 14 can be connected to a flat cable and the target board having the corresponding interface can be programmed through the flat cable, or the other end of the flat cable can be connected to the programmer handle 30 (Fig. 3) and then through the programmer handle 30 to the target board. Programming.
在本实施例中, 编程器本体 10可以通过 RS232通信接口 13和计算机相 连, CPU主控单元 12上有 UART口连接到 RS232通信接口 13。 在计算机上用 超级终端进入编程器初始化操作菜单对编程器初始化, 不需要安装其他的专 用软件。初始化包括选择目标器件、擦除编程器数据存储空间、接收用户 HEX 文件、设置编程器口令、设置编程方式(手动编程或自动编程)、联机操作等。 口令保护模块 18和加密解密模块 19可通过硬件、 固件或软件实现。 例 如, 在进行初始化之时, 可在接收 HEX文件一栏设置用户口令。 用户在使用 编程器之时, 要输入用户口令。 口令保护模块 18 比较用户输入的口令以及 HEX文件设置的口令, 如果两者一致, 则认为用户是授权用户, 则允许编程 器按照用户口令里面包含了编程数量、 编程日期、 编程器编号等信息运行。 另外, 加密保密模块 19用于加密和解密用户口令、 编程文件等, 实现以加解 密方式来传送被编程文件, 以及在编程器内对文件进行加密解密操作, 增强 了保密性。也就是说, 通过口令保护模块 18以及加密解密模块 19, 可以限制 了编程数量以及保密编程文件。 一些方案提供商可以利用这种特性来保护自 己的利益。 In this embodiment, the programmer body 10 can be connected to the computer through the RS232 communication interface 13, and the CPU main control unit 12 has a UART port connected to the RS232 communication interface 13. On the computer, use the HyperTerminal to enter the programmer initialization operation menu to initialize the programmer, no need to install other special software. Initialization includes selecting the target device, erasing the programmer data storage space, receiving the user HEX file, setting the programmer password, setting the programming mode (manual programming or automatic programming), online operation, and so on. The password protection module 18 and the encryption decryption module 19 can be implemented by hardware, firmware or software. For example, at the time of initialization, the user password can be set in the field of receiving the HEX file. The user enters the user's password when using the programmer. The password protection module 18 compares the password input by the user and the password set by the HEX file. If the two are consistent, the user is considered to be an authorized user, and the programmer is allowed to run according to the user password including the programmed quantity, the programming date, the programmer number, and the like. . In addition, the encryption security module 19 is used to encrypt and decrypt user passwords, programming files, etc., to implement the encryption and decryption mode to transfer the programmed file, and to encrypt and decrypt the file in the programmer, thereby enhancing confidentiality. That is to say, the number of programs and the secret programming file can be limited by the password protection module 18 and the encryption/decryption module 19. Some solution providers can take advantage of this feature to protect their own interests.
编程方式选择模块可通过硬件、 或软件实现。 在本实施例中, 以软件的 方式实现编程方式选择模块, 在编程器初始化过程中, 可通过初始化菜单选 择自动编程方式或手动编程方式。  The programming mode selection module can be implemented in hardware, or software. In this embodiment, the programming mode selection module is implemented in a software manner, and during the initialization process of the programmer, an automatic programming mode or a manual programming mode may be selected through an initialization menu.
编程器本体 10还包括编程按键 26和复位按键电路 25, 如图 2所示。 编 程按键 26和复位按键电路 25直接连接到 CPU主控单元 12。编程按键 26用于 手动编程方式, 每触发一次执行一次编程操作; 复位按键 25用于复位 CPU主 控单元 12。 '  The programmer body 10 also includes a programming button 26 and a reset button circuit 25, as shown in FIG. The programming button 26 and the reset button circuit 25 are directly connected to the CPU main control unit 12. The programming button 26 is used for manual programming, and the programming operation is performed once per trigger; the reset button 25 is used to reset the CPU main control unit 12. '
图 2为编程器本体的外观示意图,从该图中可以看到外壳 20表面设有与 内部电路连接的电源输入口 21、 电源开关 22、 6位 DIP拨码开关 23、 编程按 钮 26、 复位按钮 25、 LED状态指示灯 28、 电源指示灯 29以及报警器 24、 通 信接口 13和编程接口 14。 其中, DIP拨码开关来 23控制供电方式选择电路 15、 编程接口选择电路 16和编程内容选择电路 17。 例如, DIP拨码开关为 6 位 DIP拨码开关, 第 1和第 2位设置供电方式, 第 5位选择目标板接口例如 C2或者 JTAG接口, 第 3、 4位设置编程目标板或者擦除目标板, 最后一位保 留位, 留着将来定义。 例如, 可以让稳压电路 11的输出端和 6位 DIP拨码开 关的第 1位相连, 实现目标板为编程器内部电路供电, 即, 目标板可通过编 程电缆或编程器柄体 30给编程器本体 10供电。  2 is a schematic view of the appearance of the programmer body. It can be seen from the figure that the surface of the casing 20 is provided with a power input port 21 connected to the internal circuit, a power switch 22, a 6-digit DIP switch 23, a programming button 26, and a reset button. 25. LED status indicator 28, power indicator 29 and alarm 24, communication interface 13 and programming interface 14. The DIP switch switch 23 controls the power supply mode selection circuit 15, the programming interface selection circuit 16, and the programming content selection circuit 17. For example, the DIP DIP switch is a 6-digit DIP DIP switch, the 1st and 2nd bits set the power supply mode, the 5th bit selects the target board interface such as C2 or JTAG interface, and the 3rd and 4th bits set the programming target board or erase target. Board, the last reserved bit, with future definitions. For example, the output of the voltage stabilizing circuit 11 can be connected to the first bit of the 6-bit DIP switch, and the target board can supply power to the internal circuit of the programmer, that is, the target board can be programmed by the programming cable or the programmer handle 30. The body 10 is powered.
本实施例采用两个 LED状态指示灯 28和 1个报警器 24, 其中一个 LED 灯指示编程过程,在编程过程中以低于或等于 10Hz的频率闪烁。另外一个 LED 灯用来指示编程结果, 编程成功以 1Hz频率闪烁, 同时蜂鸣器发出连续的两 声 "嘟"音; 编程出错以 5Hz频率闪烁, 同时蜂鸣器发出一声 "嘟"音长音, 持续 3秒。 具体实施时, 可适当调整 LED、 蜂鸣器和按键的位置。 This embodiment uses two LED status indicators 28 and one alarm 24, one of which is LED The lamp indicates the programming process and flashes at a frequency lower than or equal to 10 Hz during programming. Another LED is used to indicate the programming result. The programming succeeds in flashing at 1Hz. At the same time, the buzzer emits two consecutive "beep"sounds; the programming error flashes at 5Hz, and the buzzer emits a "beep" tone. , lasts 3 seconds. In the specific implementation, the position of the LED, the buzzer and the button can be appropriately adjusted.
图 3为与图 1所示编程器本体配合的编程器柄体 30的原理框图, 从图中 可以看出, 该编程器柄体 30包括插座 31和多根弹簧针 32。插座 31可以是双 排十针插座例如普通的间距为 2. 54mm的十针插座, 用于连接编程器本体 10 的编程接口 14例如通过十针的扁平电缆连接编程接口 14。 所述多根弹簧针 32可以是双排十针、单排五针或单排三针等。替换地, 所述多根弹簧针 32为 插拔式弹簧针, 可插拔成双排十字,单排五针或单排三针编程头, 这种灵活的 编程头能够编程带有双排十针接口 /单排五针接口 /单排三针接口的目标板。  3 is a schematic block diagram of a programmer handle 30 that mates with the programmer body of FIG. 1. As can be seen, the programmer handle 30 includes a socket 31 and a plurality of pogo pins 32. The socket 31 can be a double row ten pin socket such as a conventional ten pin socket having a pitch of 2.54 mm, and a programming interface 14 for connecting the programmer body 10, for example, a programming cable 14 via a ten-pin flat cable. The plurality of pogo pins 32 may be a double row ten needle, a single row five needle or a single row three needle or the like. Alternatively, the plurality of pogo pins 32 are plug-in spring pins that can be plugged into a double-row cross, a single-row five-pin or a single-row three-pin programming head, and the flexible programming head can be programmed with a double row of ten Needle interface / single-row five-pin interface / single-row three-pin interface target board.
优选地, 多根弹簧针 32为长短针设计, gp, 具有一根用于最先接触目标 板的地线的长针。  Preferably, the plurality of pogo pins 32 are long and short needle designs, gp, having a long needle for the ground wire that first contacts the target plate.
如上所述, 本实施例的编程器仅在编程前需要计算机参与进行初始化, 一旦初始化完成, 就不再需要计算机的参与。 通过简单地设置拨码开关, 编 程器就能独立地或者与编程器柄体配合对目标板进行自动编程或者手动编 程。  As described above, the programmer of this embodiment requires the computer to participate in initialization only before programming, and once the initialization is completed, the participation of the computer is no longer required. By simply setting the DIP switch, the programmer can automatically or manually program the target board either independently or in conjunction with the programmer handle.
图 4,图 5为编程器本体的电路图,从图 5中可以看出,稳压电路的 DC/DC U3输入端通过电源保险丝 F4连接到 9VDC电源输入口 P1和电池 BT1的正 极。 DC/DC输出 5V到 LDO U4的输入端。 LDO U4调压输出 4V, 通过二极 管 D7降压到 3.3V连接到电源开关 S4, 电源开关另外一端 3.3V连接到编程 器内部工作电源。这样编程器可由 220VAC/9VDC电源适配器供电,也可由内 部电池供电。 同时, 二极管 D7的阴极也连接到拨码开关 S2的 bitl位, 通过 bitl位和目标板工作电源相连。 这样, 通过设置拨码开关 S2的 bitl位可以将 目标板的电源引入编程器工作电源, 从而实现目标板为编程器供电。 设置拨 码开关 S2的 bit2位到 ON, 表示目标板需要编程器供电, CPU获得这个标志 位, 控制 MOS管 Ql, 将编程器电源送到目标板工作电源, 从而实现编程器 为目标板供电。 以上就是所述编程器的供电方式。 从图 5 中可以看出, 拨码开关除了设置供电方式外, 还设置编程接口、 编程内容例如编程目标板或擦除目标板。 Bit5选择编程接口, OFF为 C2接口, ON为 JTAG接口。 CPU获得这个管脚状态后在程序选择相应的软件模块。 Bit3和 bit4选择编程目标板或者擦除目标板。 拨码开关的 Pin8, 9, 10, 11 脚连接到图 4中 CPU U1的相应 10口, CPU通过这些 IO的状态执行相应的 操作。 4, FIG. 5 is a circuit diagram of the programmer body. As can be seen from FIG. 5, the DC/DC U3 input terminal of the voltage stabilizing circuit is connected to the positive terminal of the 9 VDC power input port P1 and the battery BT1 through the power fuse F4. DC/DC output 5V to the input of LDO U4. The LDO U4 regulates the output 4V, which is stepped down to 3.3V through diode D7 and connected to power switch S4. The other end of the power switch is connected to 3.3V to the internal working power supply of the programmer. This allows the programmer to be powered by a 220VAC/9VDC power adapter or by an internal battery. At the same time, the cathode of the diode D7 is also connected to the bitl bit of the DIP switch S2, and is connected to the working power supply of the target board through the bitl bit. In this way, by setting the bitl bit of the DIP switch S2, the power of the target board can be introduced into the working power of the programmer, so that the target board supplies power to the programmer. Set the bit 2 of the DIP switch S2 to ON, indicating that the target board needs the programmer to supply power. The CPU obtains this flag bit, controls the MOS transistor Q1, and sends the programmer power to the target board working power supply, thereby implementing the programmer to supply power to the target board. The above is the power supply mode of the programmer. As can be seen from Figure 5, in addition to setting the power supply mode, the DIP switch also sets the programming interface, programming content such as programming target board or erasing the target board. Bit5 selects the programming interface, OFF is the C2 interface, and ON is the JTAG interface. After the CPU obtains this pin status, the corresponding software module is selected in the program. Bit3 and bit4 select the programming target board or erase the target board. Pins Pin 8, 9, 10, 11 of the DIP switch are connected to the corresponding 10 ports of CPU U1 in Figure 4, and the CPU performs the corresponding operations through the state of these IOs.
图 5中的按键 S3是手动编程按键, 按键变化管脚连接到图 4的 CPU中 的外部中断管脚。按下一次 S3,在 CPU上产生一次中断,执行一次编程操作。 这就是手动编程过程。 手动编程或自动编程是通过计算机初始化所述编程器 时在菜单中设定的。 当选择自动编程时, 程序中关闭外部中断, 手动变成按 键不起作用。 在图 4 CPU轮询目标板在位信号 /C20N (Pin33 ), 如果目标板 在位则执行编程操作, 否则不执行。 这就是自动编程过程。 ·.' 从图 4中可以看出, CPU通过 2线的 CPU UART接口 (第 54、 55 '管脚) 与图 5中的 RS232电平转换芯片 U2相连, U2与标准串口插座 DB9.:相连从而 连到计算机的串口, 在计算机上通过超级终端对所述编程器进行初始化。  The button S3 in Figure 5 is a manual programming button, and the button change pin is connected to the external interrupt pin in the CPU of Figure 4. Press S3 once to generate an interrupt on the CPU and perform a programming operation. This is the manual programming process. Manual programming or automatic programming is set in the menu when the programmer is initialized by the computer. When automatic programming is selected, the external interrupt is turned off in the program, and the manual change to the button does not work. In Figure 4, the CPU polls the target board in-position signal /C20N (Pin33), and if the target board is in place, the program operation is performed, otherwise it is not executed. This is the automatic programming process. ·.' As can be seen from Figure 4, the CPU is connected to the RS232 level conversion chip U2 in Figure 5 via the 2-wire CPU UART interface (54, 55 'pin), and the U2 is connected to the standard serial port DB9.: Thereby connected to the serial port of the computer, the programmer is initialized on the computer through the HyperTerminal.
从图.4中可以看出, 其中有 3个 LED指示灯和蜂鸣器 U30。 D9是工作 电源指示灯, 打开图 5中电源开关 S4, D9灯亮表示系统工作电源正常, 熄灭 表示系统电源不正常。 D11 为编程过程指示灯, 在编程过程中, 此灯以低于 或等于 10Hz的频率快速闪烁, 如果此灯熄灭, 则表示编程过程出错, 编程成 功此灯常亮; D5为编程结果指示灯, 编程过程中此灯常亮, 编程成功, 此灯 以 1Hz频率闪烁, 编程出错, 此灯以 5Hz的频率闪烁。 蜂鸣器 U30用声音来 指示编程结果。 编程成功, 蜂鸣器发出连续的两声 "嘟"音; 编程出错蜂鸣 器发出一声 "嘟"音长音, 持续 3秒。 通过声、 光两种方式来指示编程状态 和编程结果的方式, 既简单, 又明晰。 从图 4中可以看出, 有一个复位按键 S1, 按下 Sl, 可以对 CPU复位, 这样可以恢复不可预知的情况引起的编程器 异常。  As can be seen from Fig. 4, there are 3 LED indicators and buzzer U30. D9 is the working power indicator. Turn on the power switch S4 in Figure 5. When the D9 light is on, the system is working normally. If it is off, the system power is abnormal. D11 is the programming process indicator. During the programming process, the lamp flashes rapidly at a frequency lower than or equal to 10Hz. If the lamp is off, it indicates that the programming process is wrong. The programming is successful. The lamp is always on; D5 is the programming result indicator. This light is always on during programming, programming is successful, this light flashes at 1Hz frequency, programming error, this light flashes at 5Hz frequency. Buzzer U30 uses sound to indicate programming results. The programming is successful, the buzzer emits two consecutive "beep" sounds; the programming error buzzer emits a "beep" sound for 3 seconds. The way to indicate the programming state and programming results by both sound and light is simple and clear. As can be seen from Figure 4, there is a reset button S1, press Sl to reset the CPU, which can restore the programmer abnormality caused by unpredictable conditions.
从图 4中可以看出,所述编程器的主控 CPU为 C8051F123 U1。C8051F123 有丰富的 10口, 内部有多达 128KB的 Flash Memory, 其系统工作频率可以 到达 100MIPS。 CPU通过 10口连接到外围电路,获取拨码设置、控制供电方 式、 连接 RS232通信接口电路、 连接编程接口电路, 实现编程器所有功能的 核心控制。 As can be seen from FIG. 4, the master CPU of the programmer is C8051F123 U1. C8051F123 has a rich 10 ports, and has up to 128KB of Flash Memory inside. Its system working frequency can be Arrived at 100 MIPS. The CPU is connected to the peripheral circuit through 10 ports, obtains the dial setting, controls the power supply mode, connects the RS232 communication interface circuit, and connects the programming interface circuit to realize the core control of all functions of the programmer.
从图 4中可以看出,双排十针插座 JP3即为编程接口。 JP3上定义了标准 的 JTAG信号和 C2信号, 另外有电源线和地线, 所述编程器就是通过这个接 口连接到目标板完成编程工作。 标准 JTAG信号和 C2信号是由 CPU的 IO 口 (第 33, 34, 35, 36, 37脚)提供。其中 JP3的第 3脚上信号为在位信号, 在目标板上此信号接地。 CPU通过 33脚检测这个信号判断目标板是否在位, 在自动编程方式中, CPU也是通过轮询这个信号来实现自动编程操作。另夕卜, JP3 连接的所有信号都通过线路保险丝、 瞬态抑制二极管和限幅二极管对编 程接口实现保护。 这样, 编程口上的过流过压信号不至于对主控 CPU造成损 害。 '  As can be seen from Figure 4, the double-row ten-pin socket JP3 is the programming interface. The standard JTAG signal and C2 signal are defined on JP3. In addition, there are power lines and ground lines. The programmer connects to the target board through this interface to complete the programming work. The standard JTAG signal and C2 signal are provided by the CPU's IO port (pages 33, 34, 35, 36, 37). The signal on pin 3 of JP3 is the in-position signal, and this signal is grounded on the target board. The CPU detects this signal by pin 33 to determine whether the target board is in position. In the automatic programming mode, the CPU also performs automatic programming by polling this signal. In addition, all signals connected to JP3 are protected by a line fuse, a transient suppression diode, and a limiting diode. In this way, the overcurrent and overvoltage signals on the programming port will not cause damage to the main control CPU. '
双排十针插座 JP3可接十针的扁平电缆, 电缆的另一端可接具有相应接 口的目标板或者连接编程器手柄的插座。  Double-row ten-pin socket JP3 can be connected to a 10-pin flat cable. The other end of the cable can be connected to a target board with a corresponding interface or a socket to which the programmer handle is connected.
另外,在图 4, 图 5所述的编程器本体的软件设计中,对编程器的操作设 计了口令保护以及加密解密保护。 具体说来就是, 用户将编程器连接到计算 机的超级终端, 通过超级终端上的菜单选项对编程器进行初始化设置。 初始 化包括选择目标器件、 擦除编程器 Flash空间、 接收用户 HEX文件、 联机编 程等操作。其中, 在接收 HEX文件一栏设置了用户口令, 用户必须输入正确 的口令才能将 HEX文件接收到编程器中。 口令保护模块可用于判断用户输入 的口令是否正确。 用户口令里面包含了编程数量、 编程日期、 编程器编号等 信息。 也就是说, 每台编程器上的口令是唯一的, 并且编程器只接收最新的 口令, 周时, 通过口令限制了编程数量。 一些方案提供商可以利用编程器的 这种加密特性来保护自己的利益。加密保密保护模块用于加密解密用户口令、 被编程文件等, 增加了保密性。  In addition, in the software design of the programmer body described in Fig. 4 and Fig. 5, password protection and encryption and decryption protection are designed for the operation of the programmer. Specifically, the user connects the programmer to the HyperTerminal of the computer and initializes the programmer through the menu options on the HyperTerminal. Initialization includes selecting the target device, erasing the programmer's flash space, receiving user HEX files, and online programming. Among them, the user password is set in the column of receiving HEX file, and the user must input the correct password to receive the HEX file into the programmer. The password protection module can be used to determine if the password entered by the user is correct. The user password contains information such as the number of programming, programming date, programmer number, and so on. That is, the password on each programmer is unique, and the programmer only receives the latest password, and by week, the number of programming is limited by the password. Some solution providers can take advantage of this encryption feature of the programmer to protect their own interests. The encryption security protection module is used to encrypt and decrypt user passwords, programmed files, etc., and increases confidentiality.
图 6为与所述编程器配合的编程器柄体的原理图。插座 31为一个普通双 排十针插座,通过十针扁平电缆连接到所述编程器编程接口(图 4中的 JP3 ); J1为双排十针可插拔弹簧针。 J1上的弹簧针第 3脚为长针, 连接到目标板的 地线, 这样保证连接目标板时地信号先连接以实现热插拔。 弹簧针可以拆卸 变成单排五针 (留下 1, 3 , 5, 7, 9针)和单排三针(留下 1, 3, 5针)。 单 排五针和单排三针用于编程 C2接口目标板, 因为 C2接口只有时钟和数据两 根线。 单排五针和单排三针的设计可以节省目标板的 PCB空间。 弹簧针除了 可插拔组成灵活的编程头以外, 它的另外一大优点是用户握住编程器柄体顶 在目标板编程孔上就可以实现自动编程。 Figure 6 is a schematic diagram of a programmer handle mated with the programmer. The socket 31 is a conventional double-row ten-pin socket connected to the programmer programming interface (JP3 in Fig. 4) through a ten-pin flat cable; J1 is a double-row ten-pin pluggable spring pin. The third pin of the spring pin on J1 is a long needle that is connected to the target plate. Ground wire, this ensures that the signal connected to the target board is connected first for hot swapping. The pogo pins can be disassembled into a single row of five needles (leaving 1, 3, 5, 7, 9 needles) and a single row of three needles (leaving 1, 3, 5 needles). Single-row five-pin and single-row three-pin are used to program the C2 interface target board because the C2 interface has only two lines of clock and data. The single-row five-pin and single-row three-pin design saves PCB space on the target board. In addition to the pluggable flexible programming head, the spring pin has another great advantage: the user can automatically program by holding the top of the programmer handle on the target programming hole.

Claims

权 利 要 求 Rights request
1、一种手持式单片机编程器,包括编程器本体(10)和编程器柄体(30), 所述编程器本体(10)包括稳压电路(11)、 CPU主控单元(12)、 与 CPU主控 单元(12) 连接的通信接口 (13)和编程接口 (14), 所述编程器柄体 (30) 包括用于连接所述编程接口 (14) 的插座 (31 )和用于连接目标板的多根弹 簧针 (32), 其特征在于: A handheld microcontroller programmer comprising a programmer body (10) and a programmer handle body (30), the programmer body (10) comprising a voltage stabilization circuit (11), a CPU main control unit (12), a communication interface (13) and a programming interface (14) connected to the CPU main control unit (12), the programmer handle (30) including a socket (31) for connecting the programming interface (14) and for A plurality of pogo pins (32) connected to the target plate, characterized by:
所述编程器本体( 10)还包括口令保护模块( 18)以及加密解密模块(19), 所述口令保护模块 (18)用于限制编程次数, 所述加密解密模块 (「 )用于 加密和解密编程文件;  The programmer body (10) further includes a password protection module (18) for limiting the number of programming, and an encryption and decryption module (18) for encrypting and Decrypt the programming file;
所述多根弹簧针(32)包括一根用于最先接触目标板的地线的长针。 The plurality of pogo pins (32) include a long needle for the ground wire that first contacts the target plate.
2、 根据权利要求 1所述的单片机编程器, 其特征在于, 还包括编程接口 选择电路(16), 所述编程接口选择电路 ( 16)与所述编程接口 (14)配合实 现编程接口类型的切换。 2. The microcontroller of claim 1, further comprising a programming interface selection circuit (16), the programming interface selection circuit (16) cooperating with the programming interface (14) to implement a programming interface type Switch.
3、 根据权利要求 2所述的手持式单片机编程器, 其特征在于, 使用 DIP 拨码开关来控制所述编程接口选择电路 (16)。  3. A hand-held microcontroller programmer according to claim 2, wherein said programming interface selection circuit (16) is controlled using a DIP switch.
4、 根据权利要求 2所述的手持式单片机编程器, 其特征在于, 所述多根 弹簧针 (32)为插拔式弹簧针, 可插拔成双排十针、 单排五针或单排三针。  The handheld MCU programmer according to claim 2, wherein the plurality of spring pins (32) are plug-in spring pins, which can be plugged into a double row ten pin, a single row five pin or a single Three rows of needles.
5、 根据权利要求 1所述的单片机编程器, 其特征在于, 还包括供电方式 选择电路(15), 所述供电方式选择电路(15)与所述稳压电路(11 )配合实 现供电方式的切换。  The single chip programmer according to claim 1, further comprising a power supply mode selection circuit (15), wherein the power supply mode selection circuit (15) and the voltage stabilization circuit (11) cooperate to implement a power supply mode Switch.
6、根据权利要求 5所述的单片机编程器,其特征在于,,所述稳压电路(11 ) 的输入端与外部电源或内部电池连接, 输出端给所述编程器本体(10)供电。  The single chip programmer according to claim 5, wherein the input end of the voltage stabilizing circuit (11) is connected to an external power source or an internal battery, and the output terminal supplies power to the programmer body (10).
7、根据权利要求 6所述的单片机编程器,其特征在于,所述稳压电路(11 ) 的输出端还给目标板供电。  The single chip programmer according to claim 6, wherein the output end of the voltage stabilizing circuit (11) further supplies power to the target board.
8、 根据权利要求 5所述的手持式单片机编程器, 其特征在于, 目标板给 所述编程器本体供电。  8. The handheld MCU as claimed in claim 5, wherein the target board supplies power to the programmer body.
9、 根据权利要求 5所述的手持式单片机编程器, 其特征在于, 使用 DIP 拨码开关来控制所述供电方式选择电路 (15)。 9. The handheld MCU programmer according to claim 5, wherein DIP is used A dip switch is used to control the power supply mode selection circuit (15).
10、 根据权利要求 1所述的手持式单片机编程器, 其特征在于, 所述编 程器本体 (10) 还包括用于切换手动编程方式和自动编程方式的编程方式选 择模块。  10. The handheld MCU as claimed in claim 1, wherein the programmer body (10) further comprises a programming mode selection module for switching between a manual programming mode and an automatic programming mode.
11、 根据权利要求 10所述的手持式单片机编程器, 其特征在于, 所述编 程器本体 (10)还包括与 CPU主控单元(12)连接的编程按键 (26)和复位 按键 (25), 编程按键(26)用于手动编程, 复位按键电路 (25)用于复位 CPU 主控单元(12)。  The handheld MCU programmer according to claim 10, wherein the programmer body (10) further comprises a programming button (26) and a reset button (25) connected to the CPU main control unit (12). The programming button (26) is used for manual programming, and the reset button circuit (25) is used to reset the CPU main control unit (12).
12、 根据权利要求 1所述的手持式单片机编程器, 其特征在于, 所述编 程器本体(10)还包括所述编程内容选择电路(17), 所述编程内容包括编程 目标板和擦除目标板。  12. The handheld microcontroller programmer of claim 1, wherein the programmer body (10) further comprises the programming content selection circuit (17), the programming content comprising a programming target board and erasing Target board.
13、 根瑭权利要求 1所述的手持式单片机编程器, 其特征在于, 所述编 程器本体的编程接口 (14) 连接厂扁平电缆, 所述扁平电缆的另一端用于连 接所述编程器柄体(30) 的插座 (31 ) 或者目标板。  13. The handheld MCU as claimed in claim 1, wherein the programming interface (14) of the programmer body is connected to a factory flat cable, and the other end of the flat cable is used to connect the programmer. The socket (31) of the handle body (30) or the target board.
14、 根据权利要求 1所述的手持式单片机编程器, 其特征在于, 所述编 程器本体 (10)还包括用于指示编程器工作:状态的指示与告警电路, 所述指 示与告警电路包括两个 LED灯和一个蜂鸣器, 其中一个 LED灯以用于指示编 程过程, 另一个 LED灯与蜂鸣器配合用于指示编程是否成功。 14. The handheld microcontroller programmer of claim 1, wherein the programmer body (10) further comprises an indication and alarm circuit for indicating a programmer operation : a status, the indication and alarm circuit comprising Two LED lights and one buzzer, one of which is used to indicate the programming process, and the other LED is used in conjunction with the buzzer to indicate whether the programming was successful.
: 15、 根据权利要求 1所述的手持式单片机编程器, 其特征在于, 所述编 程接口还包括保护电路, 通过该保护电路能够实现瞬态抑制保护和过流保护。 : 15, hand-held programming microcontroller according to claim 1, wherein said programming interface further includes a protection circuit, the protection circuit can be achieved by transient suppression protection and overcurrent protection.
16、根据权利要求 1至 15中任意一项所述的手持式单片机编程器, 其特 征在于, 所述通信接口 (13 ) 为 RS232串行接口, 所述 CPU主控单元(12) 采用单片机 C8051F123, 所述编程接口 (14) 为可切换的 C2/JTAG接口。  The handheld MCU programmer according to any one of claims 1 to 15, wherein the communication interface (13) is an RS232 serial interface, and the CPU main control unit (12) adopts a single chip C8051F123. The programming interface (14) is a switchable C2/JTAG interface.
PCT/CN2007/000798 2007-02-15 2007-03-13 Hand held single chip microcomputer programmer WO2008098426A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNU200720118742XU CN201060402Y (en) 2007-02-15 2007-02-15 Hand-hold singlechip programmer
CN200720118742.X 2007-02-15

Publications (1)

Publication Number Publication Date
WO2008098426A1 true WO2008098426A1 (en) 2008-08-21

Family

ID=39408885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/000798 WO2008098426A1 (en) 2007-02-15 2007-03-13 Hand held single chip microcomputer programmer

Country Status (2)

Country Link
CN (1) CN201060402Y (en)
WO (1) WO2008098426A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937205B (en) * 2009-11-13 2013-01-09 广西工学院 Novel portable PLC (Programmable Logic Controller) programming device
CN102236333B (en) * 2010-04-30 2015-04-15 深圳市合信自动化技术有限公司 Programmable logic controller program uploading device and method
CN102403037A (en) * 2011-11-15 2012-04-04 苏州欣华锐电子有限公司 Chip burning base and method
CN103592858A (en) * 2013-10-14 2014-02-19 苏州市职业大学 Handhold programmer
CN114116570A (en) * 2020-08-28 2022-03-01 中强光电股份有限公司 Electronic device control system and electronic device control method
CN112947275B (en) * 2021-02-08 2023-07-21 南京康尼智控技术有限公司 Handheld programmer and control method thereof
CN113391980B (en) * 2021-06-25 2024-04-05 超越科技股份有限公司 Computer monitoring system based on singlechip

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588550A (en) * 2004-08-26 2005-03-02 复旦大学 USB general programing device
CN1808343A (en) * 2005-09-20 2006-07-26 马义德 Programmable communication converter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588550A (en) * 2004-08-26 2005-03-02 复旦大学 USB general programing device
CN1808343A (en) * 2005-09-20 2006-07-26 马义德 Programmable communication converter

Also Published As

Publication number Publication date
CN201060402Y (en) 2008-05-14

Similar Documents

Publication Publication Date Title
WO2008098426A1 (en) Hand held single chip microcomputer programmer
US11630431B2 (en) Code replacement for irrigation controllers
US20080091770A1 (en) Data transfer device for use with an intelligent electronic device (IED)
JP2006297116A (en) Breathing assisting device
CN101996289A (en) Computer with password boot-up function and boot-up method thereof
US20180294655A1 (en) Portable electric work machine, and battery pack
RU102402U1 (en) COMMUNICATION GSM / GPRS CONTROLLER
CN108103683B (en) Sewing machine equipment and software program upgrading device thereof
WO2013097450A1 (en) Portable downloader
US7460918B2 (en) Devices and methods for updating the programming of a system for controlling an electric rotary machine
EP2544736B1 (en) A combination of a portable monitoring device and a medical device and a method of monitoring a medical device
KR200492906Y1 (en) Bluetooth equipping power connecting unit for heating wear
CN210776655U (en) Multi-serial port burner
CN110716416B (en) Connector type power-on timing device and power-on timing method
CN210428444U (en) Programmable data acquisition card
TW202107292A (en) Burning tool of a tire pressure sensor
KR100641058B1 (en) Auto game apparatus for using usb connector
CN215895442U (en) ARM singlechip burns record equipment
CN217305845U (en) Firmware program burning device, mainboard and programming intelligent equipment
CN218383690U (en) Integrated infrared test tool
TW200408938A (en) Method for recording test procedure
AU2020286118A1 (en) Method, system and device for liquid treatment
US8653976B2 (en) Combination of a portable monitoring device and a portable drip infusion set and a method of monitoring a portable drip infusion set
KR20090097751A (en) Apparatus for displaying computer usage history
US20140333454A1 (en) Portable monitoring device for remotely monitoring a medical device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07720387

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 21-12-2009)

122 Ep: pct application non-entry in european phase

Ref document number: 07720387

Country of ref document: EP

Kind code of ref document: A1