CN102520222A - Electric energy meter system anti-interference control method - Google Patents

Electric energy meter system anti-interference control method Download PDF

Info

Publication number
CN102520222A
CN102520222A CN2011103330391A CN201110333039A CN102520222A CN 102520222 A CN102520222 A CN 102520222A CN 2011103330391 A CN2011103330391 A CN 2011103330391A CN 201110333039 A CN201110333039 A CN 201110333039A CN 102520222 A CN102520222 A CN 102520222A
Authority
CN
China
Prior art keywords
external memory
electric energy
energy meter
tagged word
interrupt
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
CN2011103330391A
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.)
Ningbo Sanxing Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric 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 Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN2011103330391A priority Critical patent/CN102520222A/en
Publication of CN102520222A publication Critical patent/CN102520222A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to an electric energy meter system anti-interference control method. The method comprises the following steps: before a CPU reads data, firstly whether an external memory is in normal working or not is determined, which means that a method of sending a tagged word to the external memory, reading out the tagged word and determining whether a result is consistent with the sent tagged word or not is employed, if so, it is proved that the external memory is in normal working, at that time, data read from the external memory by the CPU is correct data, if not, it is proved that the external memory still does not in normal working, after a period of time, the tagged word is sent to the external memory again for carrying out detection until a read result is same with written data, repetition number n is set, when repetition is carried out n times, the read result is not same with the written data, a system is restarted, and the memory is protected. By employing the method, a phenomenon that power supply voltage rises too slow and leads to wrong modification of a record result is avoided.

Description

The anti-interference control method of electric energy meter system
Technical field:
The present invention relates to the electric energy meter technical field, specifically is the anti-interference control method of a kind of electric energy meter system.
Background technology:
Electric energy meter can receive the interference that electric power system produces in actual moving process; Special in electric energy meter system with power down protection writing function; When electric energy meter re-powers; CPU can read once more and be stored in data in the storer; This just requires to improve the power supply quality of electric power system, as uses measures such as various voltage stabilizers, power adjustment to eliminate the influence of electric network noises, promptly adopts measure on the hardware circuit to eliminate the phenomenon of the mistake upset of the voltage comparator that electric energy meter causes because of the voltage fluctuation of electric power system.
Though electric energy meter is taked certain measure to the interference of voltage fluctuation on hardware, for powering on the stage of electric energy meter, the read-write mistake of the inharmonious appearance of system works; Hardware can't solve: during system power-on phase; Because pcb board is printed the influence of lines inductance, supply voltage rises slowly, when CPU operate as normal; Voltage comparator circuit output is low level still, causes sending external interrupt signal.Though storer itself has the write-protect end, unstable because of system works, as not taking necessary software processes measure, still can make system produce interrupt response, thereby change by mistake the record result, the random number write store among the RAM of the stage CPU that is about to power on.
Summary of the invention:
The technical matters that the present invention will solve is, overcomes existing technological deficiency, powering on the stage of a kind of solution is provided, the anti-interference control method of electric energy meter system of the read-write mistake of the inharmonious appearance of system works.
Technical solution of the present invention is, provides a kind of electric energy meter system anti-interference control method, and it may further comprise the steps:
(1), begins program initialization, and disabled interrupt;
(2), whether inquiry have an external interrupt, if external interrupt is arranged, then interrupt, and continue inquiry, if no external interrupt then gets into next step;
(3), wait for that t1 after the time, sends into tagged word, and then reads out in external memory storage; And whether judged result is consistent with the value of the tagged word of sending into, if identical, then proves external memory storage operate as normal; Get into step (5),, then return step (3) if inequality;
(4), repeat after n time, still inequality, then system restarts, and returns step (1),
(5), playback record data and parameter is set;
(6), open interruption, entering electric energy meter master routine.
Said t1 is 10ms, and said n is 3.
After adopting said method, the present invention has the following advantages:
Whether the present invention judges external memory storage operate as normal earlier before the CPU reading of data, promptly adopt to storer and send into tagged word, and read out; If the method whether judged result is consistent with the tagged word of sending into identical, then proves external memory storage operate as normal; Data in the CPU reading external memory are correct data at this moment, if inequality, explain that then external memory storage does not still have operate as normal; Send into tagged word once more after then waiting for a period of time and detect, until the result who reads with write identical, but owing to the erasable number of times of storer is limited; Pernicious situation in order to prevent to occur is provided with multiplicity n, when repeating after n time; Still inequality, then system restarts, thus protected storage.Adopt this method because each duty that CPU writes before, detects external memory storage, therefore, overcome supply voltage and had risen slowly, cause changing by mistake the phenomenon generation of writing down the result.
Description of drawings:
Accompanying drawing is the process flow diagram of the anti-interference control method of electric energy meter system of the present invention.
Embodiment:
Below in conjunction with accompanying drawing and embodiment the present invention is done further detailed explanation.
As shown in the figure, the present invention provides a kind of electric energy meter system anti-interference control method, and it may further comprise the steps:
(1), begins program initialization, and disabled interrupt; During beginning, first disabled interrupt, the data in the reading external memory, the model of the external memory storage that adopts in the present embodiment are AT24C02.
(2), whether inquiry have an external interrupt, if external interrupt is arranged, then interrupt, and continue inquiry, if no external interrupt then gets into next step; This step is that the Interrupt Process of handling is accomplished, and prevents to influence each other.
(3), wait for that t1 after the time, sends into tagged word, and then reads out in external memory storage; And whether judged result is consistent with the value of the tagged word of sending into, if identical, then proves external memory storage operate as normal; Get into step (5),, then return step (3) if inequality; Tagged word can be used 55H (01010101B) or AAH (10101010B).
(4), repeat after n time, still inequality, then system restarts, and returns step (1); Because the erasable number of times of external memory storage is limited, for the vicious cycle that prevents to occur, so set multiplicity n; After repetition n time, still inequality, CPU gets into endless loop; In endless loop, do not visit house dog, above (about 1.6S, house dog allows the maximum access time interval) after the certain hour; House dog sends reset signal, and system restarts.
(5), playback record data and parameter is set; The external memory storage operate as normal then can the reading external memory data recorded perhaps be provided with parameter;
(6), open interruption, entering electric energy meter master routine.
Said t1 is 10ms, and said n is 3.
After adopting said method, the present invention has the following advantages:
Whether the present invention judges external memory storage operate as normal earlier before the CPU reading of data, promptly adopt to storer and send into tagged word, and read out; If the method whether judged result is consistent with the tagged word of sending into identical, then proves external memory storage operate as normal; Data in the CPU reading external memory are correct data at this moment, if inequality, explain that then external memory storage does not still have operate as normal; Send into tagged word once more after then waiting for a period of time and detect, until the result who reads with write identical, but owing to the erasable number of times of storer is limited; Pernicious situation in order to prevent to occur is provided with multiplicity n, when repeating after n time; Still inequality, then system restarts, thus protected storage.Adopt this method because each duty that CPU writes before, detects external memory storage, therefore, overcome supply voltage and had risen slowly, cause changing by mistake the phenomenon generation of writing down the result.

Claims (2)

1. anti-interference control method of electric energy meter system, it is characterized in that: it may further comprise the steps:
(1), begins program initialization, and disabled interrupt;
(2), whether inquiry have an external interrupt, if external interrupt is arranged, then interrupt, and continue inquiry, if no external interrupt then gets into next step;
(3), wait for that t1 after the time, sends into tagged word, and then reads out in external memory storage; And whether judged result is consistent with the value of the tagged word of sending into, if identical, then proves external memory storage operate as normal; Get into step (5),, then return step (3) if inequality;
(4), repeat after n time, still inequality, then system restarts, and returns step (1),
(5), playback record data and parameter is set;
(6), open interruption, entering electric energy meter master routine.
2. the anti-interference control method of electric energy meter system according to claim 1 is characterized in that: said t1 is 10ms, and said n is 3.
CN2011103330391A 2011-10-28 2011-10-28 Electric energy meter system anti-interference control method Pending CN102520222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103330391A CN102520222A (en) 2011-10-28 2011-10-28 Electric energy meter system anti-interference control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103330391A CN102520222A (en) 2011-10-28 2011-10-28 Electric energy meter system anti-interference control method

Publications (1)

Publication Number Publication Date
CN102520222A true CN102520222A (en) 2012-06-27

Family

ID=46291210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103330391A Pending CN102520222A (en) 2011-10-28 2011-10-28 Electric energy meter system anti-interference control method

Country Status (1)

Country Link
CN (1) CN102520222A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317746A (en) * 2014-10-27 2015-01-28 安徽江淮汽车股份有限公司 Data redundancy access method for EEPROM (electrically erasable programmable read-only memory)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197191A (en) * 2001-09-13 2008-06-11 株式会社瑞萨科技 Memory card and its initial setting method
CN201387448Y (en) * 2009-02-25 2010-01-20 青岛乾程电子科技有限公司 Multi-functional electric energy meter with high-reliability data storage function
CN101923112A (en) * 2010-07-26 2010-12-22 珠海中慧微电子有限公司 Method for managing high reliability of electric energy measurement data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197191A (en) * 2001-09-13 2008-06-11 株式会社瑞萨科技 Memory card and its initial setting method
CN201387448Y (en) * 2009-02-25 2010-01-20 青岛乾程电子科技有限公司 Multi-functional electric energy meter with high-reliability data storage function
CN101923112A (en) * 2010-07-26 2010-12-22 珠海中慧微电子有限公司 Method for managing high reliability of electric energy measurement data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317746A (en) * 2014-10-27 2015-01-28 安徽江淮汽车股份有限公司 Data redundancy access method for EEPROM (electrically erasable programmable read-only memory)

Similar Documents

Publication Publication Date Title
US9645829B2 (en) Techniques to communicate with a controller for a non-volatile dual in-line memory module
CN102214152B (en) Fast exit from self-refresh state of a memory device
CN103544080B (en) A kind of data guard method, Apparatus and system
CN105283918A (en) Apparatus, method and system for memory device access with a multi-cycle command
KR101447142B1 (en) Write energy conservation in memory
CN107408099A (en) Based on the impedance-compensated of detection sensor data
WO2009095902A3 (en) Systems and methods for handling immediate data errors in flash memory
TW200746155A (en) Semiconductor memory and method for testing the same
US20140372737A1 (en) Electronic device and method for automatically waking up operating system of electronic device
TW201327564A (en) Memory storage device, memory controller and controlling method
CN100369156C (en) Semiconductor storage and control method thereof
CN102915209B (en) Storage control chip, storage equipment and system data writing method
CN110364202A (en) Memory device
CN113223566B (en) Control system and control method of memory
CN107807870B (en) Method and system for testing power-down protection function of storage server mainboard
CN109901664A (en) Method, apparatus, system, equipment and the readable storage medium storing program for executing of clock signal are provided
CN109144778A (en) A kind of storage server system and its backup method, system and readable storage medium storing program for executing
CN102520222A (en) Electric energy meter system anti-interference control method
CN206331414U (en) A kind of solid state hard disc
CN106547577B (en) Method and device for burning microcontroller chip
WO2008042201A3 (en) Memory write timing system
CN1937075B (en) Data transfer operation completion detection circuit and semiconductor memory device provided therewith
CN105531681A (en) Storage apparatus, storage system, storage apparatus controlling method
CN100595842C (en) Memory interface arrangement and memory data access method applied on same
CN109299018B (en) Method and device for reading historical data in Flash memory

Legal Events

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

Application publication date: 20120627