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
control method
Prior art date
Application number
CN2011103330391A
Other languages
Chinese (zh)
Inventor
郑坚江
周忠祥
刘其君
陈恢云
Original Assignee
宁波三星电气股份有限公司
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 宁波三星电气股份有限公司 filed Critical 宁波三星电气股份有限公司
Priority to CN2011103330391A priority Critical patent/CN102520222A/en
Publication of CN102520222A publication Critical patent/CN102520222A/en

Links

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 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 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
US9582058B2 (en) Power inrush management of storage devices
CN103118188B (en) Application heartbeat cycle adjusting method and device, and terminal
US9424891B2 (en) Methods and devices for temperature sensing of a memory device
US7966506B2 (en) Saving power in a computer system
US10102886B2 (en) Techniques for probabilistic dynamic random access memory row repair
CN105706069B (en) Cycle training for non-matched signal receiver
CN107533509A (en) The specific self-refresh of memory devices enters and exited
CN105283918B (en) The equipment realized memory device and accessed, method and system are ordered using the multicycle
CN1977340B (en) Method and system for providing seamless self-refresh for directed bank refresh in volatile memories
CN104737234A (en) Row hammer monitoring based on stored row hammer threshold value
US8832530B2 (en) Techniques associated with a read and write window budget for a two level memory system
TWI334145B (en) A computing method, computing apparatus, and machine readable medium
CN101794256B (en) Non-volatile memory subsystem and Memory Controller thereof
KR100655076B1 (en) Method for outputting internal temperature data in semiconductor memory device and internal temperature data circuit therefor
CN101286086B (en) Hard disk power down protection method, device and hard disk, and hard disk power down protection system
DE102010053281A1 (en) Method and system for error handling in a storage device
CN101853217B (en) Cache controlling apparatus, information processing apparatus, and computer-readable recording medium on or in which cache controlling program is recorded
US9158616B2 (en) Method and system for error management in a memory device
CN101103415B (en) Method and system for minimizing impact of refresh operations on volatile memory performance
KR19990067754A (en) Refresh period control apparatus and method, and computer
CN100468374C (en) Method and apparatus to establish, report and adjust system memory usage
US20180090211A1 (en) Data Storage Device and Voltage Protection Method Thereof
US7395398B2 (en) Memory controller that selectively changes frequency of a memory clock signal, a smart card including the same, and a method of controlling a read operation of a memory
CN103377695A (en) Memory systems, memory devices and memory controllers and methods for operating them
CN100590606C (en) Data completeness protection method of flash storage

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