CN110134411A - A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip - Google Patents

A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip Download PDF

Info

Publication number
CN110134411A
CN110134411A CN201910417186.3A CN201910417186A CN110134411A CN 110134411 A CN110134411 A CN 110134411A CN 201910417186 A CN201910417186 A CN 201910417186A CN 110134411 A CN110134411 A CN 110134411A
Authority
CN
China
Prior art keywords
chip
program
burning
time
flag bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910417186.3A
Other languages
Chinese (zh)
Inventor
仲敢
戴诚
方誉
章超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Huapeng Intelligent Instrument Technology Co Ltd
Original Assignee
Jiangsu Huapeng Intelligent Instrument Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Huapeng Intelligent Instrument Technology Co Ltd filed Critical Jiangsu Huapeng Intelligent Instrument Technology Co Ltd
Priority to CN201910417186.3A priority Critical patent/CN110134411A/en
Publication of CN110134411A publication Critical patent/CN110134411A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

Whether the present invention provides a kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip, comprising the following steps: power on rear detection chip burning program;When not detecting that burning chip has program, programmable device and electric energy meter chip establish connection and program and configuration file are downloaded in ammeter chip;Setting programs flag bit and burning chip Success Flag position for the first time, wherein when programming flag bit is a numerical value for the first time, the automatic burning program of programmable device, when burning chip Success Flag position is a numerical value, chip program burning success;Programming flag bit is controlled the variation for carrying out numerical value by case for the first time.

Description

A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip
Technical field
The present invention relates to a kind of automatic burning technology, especially a kind of self-identifying burning suitable for ammeter RN8318 chip Method.
Background technique
Burning refers to the corresponding machine code write-in IC of program or single-chip microcontroller to realize corresponding function.Current cd-rom recorder During burning program, it is necessary to cooperate key to complete, extreme influence efficiency when batch production.
Summary of the invention
The purpose of the present invention is to provide a kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip, can be automatic Identification chip whether complete burning.
Realize the technical solution of the object of the invention are as follows: a kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip, The following steps are included:
Step1: programmable device initializes after powering on, wherein program_first=1, program_complete=0;
Step2: detection programs flag bit (program_first) for the first time
1) it when flag bit is 1, to program for the first time, needs to be programmed by key pressing, jumps to Step5;
2) when flag bit is 0, illustrate it is not to program for the first time, direct automatic identification programming jumps step3;
Step3:SWD connection checks that electric energy meter is communicated by SWD interface and programmable device
1) programmable device and ammeter SWD successful connection, program_complete are set to 1, prevent from carrying out repeating volume to same chip Journey;
2) connection is unsuccessful, and program_complete sets 0, into Step5;
Step4: after successful connection, program and configuration file are downloaded to ammeter by SWD interface by programmable device;
Step5: whether detection downloading program key is pressed
1) as pressed key pressing, program_first is set to 0, downloads automatically after allowing the successful connection of later programmed device, by program and Configuration file downloads to ammeter;
2) it without actuation of keys, performs the next step;
Step6: detect whether to receive program or configuration that programmable device upper computer software downloads to ammeter to programmable device domestic demand More newer command
1) if you need to be updated to programmable device internal program or configuration, program_first is set to 1, and the automatic downloading of starting next time needs Again key starts, and is updated simultaneously to program or configuration;
2) do not receive related command, perform the next step;
Step7: jumping to Step2, repeats the above execution step.
Compared with prior art, the present invention having the advantage that the present invention two flag bits of setting, which can To identify whether cd-rom recorder is that whether burning finishes for burning for the first time and chip, has self-recognition function.It is especially raw in batch During production, human cost, the expenditure cost of less enterprise can be saved.
The invention will be further described with reference to the accompanying drawings of the specification.
Detailed description of the invention
Fig. 1 is method flow schematic diagram of the invention.
Specific embodiment
Heretofore described flag bit program_first is programming flag bit.When programmable device and ammeter SWD connect into Function, program_complete are set to 1, prevent from carrying out overprogram to same chip.If programmable device can not connect with ammeter SWD Function, program_complete set 0.Under the premise of detecting that connection is good, then do following judgement: program_ Programming needs key to cooperate when complet is " 1 ", and programmable device automatic identification programs when for " 0 ".After automatic identification procedure, only It needs to connect sufficiently, so that it may automatic burning, it is no longer necessary to operation button.After programming success, program_complete=1, It prevents from carrying out automatic programming to this chip again
RN8318 chip of the present invention is the dedicated MCU chip of electric energy meter of Rui Nengwei Science and Technology Ltd. production.
SWD(Serial Wire Debug of the present invention) be serial debugging mode interface general name.Electric energy meter passes through SWD interface (VCC power interface, the ground GND interface, CLK clock line interface, I/O data interface) is communicated with programmable device, by programmable device The program and configuration file of kind download to electric energy meter.
Host computer of the present invention, which refers to, provides the terminal of program for chip.
In conjunction with Fig. 1, a kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip, comprising the following steps:
Step S101, programmable device are powered on and are initialized, and enable program_first=1, program_complete=0;
Step S102, detection programs flag bit program_frist for the first time, if program_frist=1, to program for the first time, Go to step S105;If program_frist=0, connect unsuccessful, goes to step S103;
Step S103, chip connection checks, if successful connection, program_complete=1 prevents from carrying out same chip Overprogram goes to step S104;If connection is unsuccessful, program_complete=0 goes to step S105;
Program and configuration file are downloaded to electric energy meter by SWD interface by step S104, programmable device;
Whether step S105, detection downloading program key are pressed, if key is pressed, program_frist=0 is gone to step S103;If programming key is not pressed, S106 is gone to step;
Step S106 judges whether to receive the downloading of host computer engineering and check command, if receiving related command, Program_frist=1 simultaneously carries out engineering downloading and goes to step S107 after verifying;Otherwise S107 is directly gone to step;
Step S107 judges whether to receive host computer and reads back data command, if receiving related command, program_ It simultaneously reads back and data inside chips and goes to step S108 after returning to host computer in frist=1;Otherwise S108 is directly gone to step;
Step S108 initializes key-press status and goes to step S102, repeats above step.

Claims (5)

1. a kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip, comprising the following steps:
Power on rear detection chip whether burning program;
When not detecting that burning chip has program, programmable device and electric energy meter chip establish connection and by program and configuration files It is downloaded in ammeter chip;It is characterized in that,
Setting programs flag bit and burning chip Success Flag position for the first time, wherein
When programming flag bit is a numerical value for the first time, the automatic burning program of programmable device,
When burning chip Success Flag position is a numerical value, chip program burning success;
Programming flag bit is controlled the variation for carrying out numerical value by case for the first time.
2. the method according to claim 1, wherein if for the first time programming flag bit be 1 when, to program for the first time; It is not to program for the first time if programming flag bit is 0 for the first time, direct automatic identification programming.
3. the method according to claim 1, wherein if burning chip Success Flag position be 1 when, burning chip Success.
4. the method according to claim 1, wherein it is first to press case control if chip detects more newer command Secondary programming flag bit becomes a numerical value and is updated.
5. the method according to claim 1, wherein pressing case control if chip detects data back order Programming flag bit becomes a numerical value and is updated system for the first time.
CN201910417186.3A 2019-05-20 2019-05-20 A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip Pending CN110134411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910417186.3A CN110134411A (en) 2019-05-20 2019-05-20 A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910417186.3A CN110134411A (en) 2019-05-20 2019-05-20 A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip

Publications (1)

Publication Number Publication Date
CN110134411A true CN110134411A (en) 2019-08-16

Family

ID=67571429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910417186.3A Pending CN110134411A (en) 2019-05-20 2019-05-20 A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip

Country Status (1)

Country Link
CN (1) CN110134411A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131098A (en) * 2020-08-07 2020-12-25 国家电网有限公司 Method and system for testing electric energy meter software

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020143950A1 (en) * 2001-03-29 2002-10-03 Kenner Martin A. Display of software notes accessed by content recipient from content provider site
CN1632763A (en) * 2004-12-15 2005-06-29 时仁帅 Automatic debugging and mistake correcting method and system for assembly program in embedded module
CN102789402A (en) * 2012-06-29 2012-11-21 徐下兵 Program automatic debugging method
CN103176806A (en) * 2011-12-21 2013-06-26 富泰华工业(深圳)有限公司 Programming system and programming controlling method
CN104657160A (en) * 2013-11-21 2015-05-27 联创汽车电子有限公司 Multichip application burning method of vehicle-mounted controller
CN105138869A (en) * 2015-08-17 2015-12-09 四川长虹电器股份有限公司 Method for automatically locking and protecting flash bootstrap program based on flag detection
CN106990982A (en) * 2017-03-20 2017-07-28 北京新能源汽车股份有限公司 Program updating method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020143950A1 (en) * 2001-03-29 2002-10-03 Kenner Martin A. Display of software notes accessed by content recipient from content provider site
CN1632763A (en) * 2004-12-15 2005-06-29 时仁帅 Automatic debugging and mistake correcting method and system for assembly program in embedded module
CN103176806A (en) * 2011-12-21 2013-06-26 富泰华工业(深圳)有限公司 Programming system and programming controlling method
CN102789402A (en) * 2012-06-29 2012-11-21 徐下兵 Program automatic debugging method
CN104657160A (en) * 2013-11-21 2015-05-27 联创汽车电子有限公司 Multichip application burning method of vehicle-mounted controller
CN105138869A (en) * 2015-08-17 2015-12-09 四川长虹电器股份有限公司 Method for automatically locking and protecting flash bootstrap program based on flag detection
CN106990982A (en) * 2017-03-20 2017-07-28 北京新能源汽车股份有限公司 Program updating method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131098A (en) * 2020-08-07 2020-12-25 国家电网有限公司 Method and system for testing electric energy meter software

Similar Documents

Publication Publication Date Title
CN101604272B (en) Apparatus and method for memory card testing
CN107479913A (en) A kind of FPGA configurations low-resources that start take update method and implement system more
CN103295284B (en) A kind of LED-based communication means and light-operated mobile terminal
US20060047994A1 (en) Method for burning BIOS
CN101470410A (en) Burning apparatus and method for control chip
CN111475364A (en) Method and system for testing system-on-chip
CN102981916A (en) Mobile terminal and control method of mobile terminal and device of mobile terminal
CN203338129U (en) Detection device used for access controller mass production
CN109462842B (en) Automatic control method for downloading and testing Bluetooth SIM card
CN110134411A (en) A kind of self-identifying method for burn-recording suitable for ammeter RN8318 chip
CN101441574B (en) Multiple-FPGA logical loading method in embedded system
CN116246680A (en) PROM programmer
CN117572219B (en) Automatic test system and method for electrical parameters of MCU (micro control Unit) chip
CN109408099A (en) Remote FPGA firmware code updating system, method and medium
CN105824732A (en) USB detection method and detection system
CN205620994U (en) Embedded equipment processing apparatus
CN212847692U (en) Testing device for verifying eMMC and SD card
CN105676024A (en) Aging test method and device for electronic product
CN112395224B (en) Data processing method and system, concatenation device and electronic equipment
CN109542469B (en) BIOS chip substitution circuit implementation method
KR20090095029A (en) Control method for programable power control unit and test system for semiconductor
CN211979124U (en) Manual control testing device of ATE (automatic test equipment)
CN111972726B (en) Dynamic switching method of electronic cigarette system
CN113824611A (en) Current consumption testing method, device, equipment and storage medium of wireless communication module
CN111007336A (en) Module production test power-on and power-off automatic detection system and method based on serial port communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190816