CN106601299A - Method and device for improving service life of electrically erasable programmable read-only memory - Google Patents
Method and device for improving service life of electrically erasable programmable read-only memory Download PDFInfo
- Publication number
- CN106601299A CN106601299A CN201611040478.2A CN201611040478A CN106601299A CN 106601299 A CN106601299 A CN 106601299A CN 201611040478 A CN201611040478 A CN 201611040478A CN 106601299 A CN106601299 A CN 106601299A
- Authority
- CN
- China
- Prior art keywords
- eeprom
- control unit
- zero cross
- micro
- service life
- 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
Links
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/34—Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention
- G11C16/349—Arrangements for evaluating degradation, retention or wearout, e.g. by counting erase cycles
- G11C16/3495—Circuits or methods to detect or delay wearout of nonvolatile EPROM or EEPROM memory devices, e.g. by counting numbers of erase or reprogram cycles, by using multiple memory areas serially or cyclically
Abstract
The invention is applicable to the computer field, and provides a method for improving the service life of an electrically erasable programmable read-only memory (EEPROM); the method is applied to a micro control unit; the input end of the micro control unit is connected to the output end of a zero cross detection circuit, and the output end of the micro control unit is connected with the EEPROM. The method comprises the steps: receiving a signal outputted by the output end of the zero cross detection circuit; judging whether the signal is a zero cross signal; and if the signal is not the zero cross signal, controlling the EEPROM to perform write operation immediately, recording current work state data for use in next electrifying through the write operation of the EEPROM. The invention also provides a device for improving the service life of the EEPROM. The method and device provided by the invention can reduce the number of erasing times, thereby improving the service life of the EEPROM.
Description
Technical field
The invention belongs to computer realm, more particularly to a kind of raising EEPROM service life
Method and device.
Background technology
EEPROM (Electrically Erasable Programmable Read-Only
Memory, EEPROM) be it is a kind of can pass through electronically the repeatedly semiconductor memory apparatus of manifolding, can on computers or specially
Information and reprogramming are had with erasing on equipment.Compare Erarable Programmable Read only Memory (Erasable
Programmable Read-Only Memory, EPROM), EEPROM need not be irradiated with ultraviolet, and being also not required to remove can
With the information erased with specific voltage on chip, to write new data.
With the popularization of intelligent electrical apparatus, many aspects need to use EEPROM to store power down before data, so as to
, without the need for Reparametrization after electricity on next time, machine just can be according to the parameter work for setting before, regardless of whether being for user
The EEPROM carried inside plug-in EEPROM, or micro-control unit (Microcontroller Unit, MCU), it uses the longevity
Life is all limited, and general erasable number of times is at 100,000 times or so.
Therefore, need badly and a kind of method of raising EEPROM service lifes is provided.
The content of the invention
The embodiment of the present invention provides a kind of method and device for improving EEPROM service life, purport
Solving the problems, such as how EEPROM service life is improved in the case of limited erasable number of times.
The embodiment of the present invention is achieved in that a kind of side of raising EEPROM service life
Method, is applied to micro-control unit, and the input of the micro-control unit connects the outfan of zero cross detection circuit, the microcontroller
The outfan connection EEPROM of unit, methods described includes:
Receive the signal of the outfan output of the zero cross detection circuit;
Judge whether the signal is zero cross signal;
If the signal is not zero cross signal, controls the EEPROM and enter row write behaviour immediately
Make, current operating state data are recorded by the write operation of the EEPROM in case next time makes when upper electric
With.
The embodiment of the present invention also provide it is a kind of raising EEPROM service life device, including according to
The secondary zero cross detection circuit being linked in sequence, micro-control unit and EEPROM, wherein,
The zero cross detection circuit input connection alternating current, for detect alternating current break-make and by break-make information send out
Give the micro-control unit;
The input of the micro-control unit connects the outfan of the zero cross detection circuit, for detecting alternating current
The EEPROM is controlled during disconnection carries out immediately write operation, deposits by the way that the electric erazable programmable is read-only
The write operation record current operating state data of reservoir when next electric in case use.
The technical scheme that the present invention is provided, exchange input has been detected whether by having detected whether zero cross signal, and then
Machine whether power down is judged, so as to decide whether the read-only storage of operating state data write electric erazable programmable of current machine
In case next time uses when upper electric in device, and then the erasable number of times of EEPROM is greatly reduced, effectively
The service life of EEPROM is extended, the execution efficiency of program is improve.
Description of the drawings
Fig. 1 is the method flow of raising EEPROM service life provided in an embodiment of the present invention
Figure;
Fig. 2 is the structure of the device of raising EEPROM service life provided in an embodiment of the present invention
Schematic diagram;
Fig. 3 is the electrical block diagram of zero cross detection circuit provided in an embodiment of the present invention 11;
Fig. 4 is the electrical block diagram of power circuit provided in an embodiment of the present invention 14.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, and
It is not used in the restriction present invention.
A kind of method for improving EEPROM service life provided by the present invention will be entered below
Row is described in detail.
Fig. 1 is referred to, is the side of raising EEPROM service life provided in an embodiment of the present invention
Method flow chart.
In the present embodiment, there is provided a kind of improve EEPROM (Electrically
Erasable Programmable Read-Only Memory, EEPROM) method of service life is applied to micro-control unit
(Microcontroller Unit, MCU), the input of the micro-control unit connects the outfan of zero cross detection circuit, institute
State the outfan connection EEPROM of micro-control unit.
In step sl, the signal of the outfan output of the zero cross detection circuit is received.
In the present embodiment, the live wire or zero line of the input connection alternating current of the zero cross detection circuit, described
Zero cross detection circuit is used for from the exchange electrical receive signal, and judges whether the signal for receiving is zero cross signal, if
Zero cross signal, then show that the alternating current is normal ON, and zero cross signal is exported to the micro-control unit;
If not zero cross signal, then show the alternating current to disconnect, and export high level signal to the microcontroller
Unit;If the signal of the zero cross detection circuit output is always low level signal, show that the zero cross detection circuit goes out
Existing failure.In the present embodiment, when the signal that the outfan of the zero cross detection circuit is exported is high level or low level
When, micro-control unit can also be to high level or low level difference timing.
In step s 2, judge whether the signal is zero cross signal.
If the signal is not zero cross signal, in step s3, the EEPROM is controlled
Carry out write operation immediately, current operating state data are recorded by the write operation of the EEPROM in case
Use during electricity on next time.
If the signal is zero cross signal, in step s 4, without to the EEPROM
Carry out write operation.
In the present embodiment, another input of the micro-control unit is also connected with power circuit, the power circuit
Connection alternating current, for alternating current being changed into into unidirectional current and then being powered to the micro-control unit.
In the present embodiment, if the micro-control unit receives zero cross signal, the alternating current is shown for just
Often connect, now the micro-control unit to the EEPROM without carrying out write operation;If described
Micro-control unit does not receive zero cross signal, then show the alternating current to disconnect, and now, the micro-control unit will be handed over immediately
Stream powering mode switches to direct current supply pattern, i.e., receive the direct current supply of the power circuit immediately, and in direct current supply
Write operation record current operating state data are completed in time.
The method for improving EEPROM service life provided in an embodiment of the present invention, be by detection
It is no to have zero cross signal to have detected whether exchange input, and then judge machine whether power down, so as to decide whether current machine
Operating state data write EEPROM in case use during upper electricity next time, and then greatly reduce electricity
The erasable number of times of EPROM, effectively extends the service life of EEPROM,
Improve the execution efficiency of program.
A kind of device for improving EEPROM service life provided by the present invention will be entered below
Row is described in detail.
Fig. 2 is referred to, raising EEPROM service life provided in an embodiment of the present invention is shown
Device structural representation.
In the present embodiment, improving the device 10 of EEPROM service life mainly includes zero passage
Detection circuit 11, micro-control unit 12, EEPROM 13 and power circuit 14.
In the present embodiment, zero cross detection circuit 11, micro-control unit 12 and EEPROM
13 are linked in sequence successively.
In the present embodiment, the input connection alternating current of zero cross detection circuit 11, for detecting the break-make of alternating current
And break-make information is sent to into micro-control unit 12.
In the present embodiment, zero cross detection circuit 11 is as shown in Figure 3.
Fig. 3 is referred to, the electrical block diagram of zero cross detection circuit provided in an embodiment of the present invention 11 is shown.
In the present embodiment, zero cross detection circuit 11 include first resistor R1, the first diode D1, photoelectrical coupler with
And second resistance R2, wherein, filling-in bit terminal connects the live wire L or zero line N of alternating current.
In the present embodiment, the input of first resistor R1 connects the live wire L or zero line N of alternating current, first resistor
The outfan of R1 connects the first input end of photoelectrical coupler.
In the present embodiment, the resistance value of first resistor R1 be 150K ohms, model PC817 of photoelectrical coupler,
Photoelectrical coupler includes luminous source and light-receiving device two parts, and luminous source and light-receiving device are assembled in same closed housing,
Isolated with transparent insulator to each other, wherein, the pin of luminous source is input, and the pin of light-receiving device is outfan, luminous source
For light emitting diode, light-receiving device is light sensitive diode.
In the present embodiment, the plus earth of the first diode D1, the negative pole connection first resistor of the first diode D1
The outfan of R1;Second input of photoelectrical coupler connects the positive pole of the first diode D1;First output of photoelectrical coupler
The input of end connection second resistance R2, the outfan connection high level VCC of second resistance R2.
In the present embodiment, the first outfan of photoelectrical coupler is also connected with the input of micro-control unit 12 simultaneously,
For zero cross signal to be exported to micro-control unit 12;Second output head grounding of photoelectrical coupler.
Wherein, the operation principle of zero cross detection circuit 11 includes:
Filling-in bit terminal is connected to exchange electrical input, has forward voltage, photoelectric coupling when the positive half cycle of alternating current arrives
LEDs ON between the input bipod of device, has light to send, so the outfan conducting of photoelectrical coupler, now mistake
Zero-signal test point be connected to (GND), be low level, i.e., 0;When the negative half period of alternating current arrives, due to without forward voltage,
Light emitting diode cut-off between the input bipod of photoelectrical coupler, it is unglazed to send, so photoelectric coupler output end cut-off,
Now zero cross signal test point is connected to high level VCC by second resistance R2, is high level, i.e., and 1;Because alternating current is frequency
For the sine wave of 50Hz (external some be 60Hz), thus when there is alternating current, photoelectrical coupler conducting, zero cross signal test point
Can detect a series of continuous square waves, i.e., 010101 ...;When being input into without alternating current, photoelectrical coupler is not turned on and (cut
Only), now zero cross signal test point detect always be high level, i.e., 11111111.
Please continue to refer to Fig. 2, the input of micro-control unit 12 connects the outfan of zero cross detection circuit 11, in inspection
Measuring the electrically disconnected time control EEPROM 13 of exchange carries out immediately write operation, by electric erazable programmable only
Read the write operation record current operating state data of memorizer 13 in case using when next electric.
In the present embodiment, micro-control unit 12, are additionally operable to notify electric erasable and programmable detecting when exchange is electrically connected
Journey read only memory 13 is without carrying out write operation.
Power circuit 14 connects alternating current, for alternating current being changed into into unidirectional current and then being powered to micro-control unit 12.
In the present embodiment, power circuit 14 includes plug H1, power supply chip, electrochemical capacitor EC and the first electric capacity
C1, as shown in Figure 4.
Fig. 4 is referred to, the electrical block diagram of power circuit provided in an embodiment of the present invention 14 is shown.
In the present embodiment, one end connection alternating current of plug (Header) H1, and the change-over circuit for passing through AC/DC
12 volts of unidirectional currents are exported, first outfan of plug H1 exports the input of 12 volts of unidirectional currents to power supply chip (i.e. power supply IC),
Second output head grounding of plug H1;The outfan of power supply chip is connected with one end of electrochemical capacitor EC, and electrochemical capacitor EC's is another
One end connects the earth terminal of power supply chip;One end of first electric capacity C1 connects the outfan of power supply chip, and the first electric capacity C1's is another
One end connects the earth terminal of power supply chip, the earth terminal of power supply chip and the other end of electrochemical capacitor EC, the first electric capacity C1 it is another
One end is cooperatively grounded, and one end of the first electric capacity C1 is also connected with high level VCC while connecting the outfan of power supply chip.
Wherein, the operation principle of power circuit 14 includes:
Plug H1 will be exchanged and be turned the input that the 12V voltages that direct current obtains are added in power supply chip (model 78L05), power supply
The outfan of chip just has 5V direct current electricity outputs, and electrochemical capacitor EC is just connected between the output and ground of power supply chip, main
It is energy storage to act on.
In the present embodiment, power circuit 14 should ensure that the supply voltage of micro-control unit 12 after exchange input power down
At least 150 milliseconds, when such micro-control unit 12 just has enough are maintained more than the time of the resetting voltage of micro-control unit 12
Between confirm that whether exchange power down and writes EEPROM 13 after power down is confirmed.
The resetting voltage for assuming micro-control unit 12 is 4.1V and does not work in below 4.1V micro-control units 12, detects
The alternating current power failure time is 100ms, writes EEPROM 13 and wants 5ms, then once complete detection and write electricity
Time needed for EPROM 13 is 105ms, and this requires the electrochemical capacitor EC energy after alternating current power failure
The voltage at least 105ms of more than 4.1V is enough provided, the time that this voltage is maintained can be measured with oscillograph, and adjust electrolysis
The parameter of electric capacity EC.
The device 10 for improving EEPROM service life provided in an embodiment of the present invention, by detection
Whether there is zero cross signal to have detected whether exchange input, and then judge machine whether power down, so as to decide whether current machine
In case using when upper electric next time in the operating state data write EEPROM of device, and then greatly reduce
The erasable number of times of EEPROM, effectively extends the use longevity of EEPROM
Life, improves the execution efficiency of program.
It should be noted that in above-described embodiment, included unit is simply divided according to function logic,
But above-mentioned division is not limited to, as long as corresponding function can be realized;In addition, the specific name of each functional unit
Only to facilitate mutually distinguishing, protection scope of the present invention is not limited to.
In addition, one of ordinary skill in the art will appreciate that realizing all or part of step in the various embodiments described above method
Program be can be by instruct the hardware of correlation to complete, corresponding program can be stored in embodied on computer readable storage and be situated between
In matter, described storage medium, such as ROM/RAM, disk or CD.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.
Claims (8)
1. it is a kind of improve EEPROM service life method, it is characterised in that be applied to microcontroller list
Unit, the input of the micro-control unit connects the outfan of zero cross detection circuit, the outfan connection of the micro-control unit
EEPROM, methods described includes:
Receive the signal of the outfan output of the zero cross detection circuit;
Judge whether the signal is zero cross signal;
If the signal is not zero cross signal, controlling the EEPROM carries out immediately write operation,
Current operating state data are recorded by the write operation of the EEPROM in case next time uses when upper electric.
2. the method for improving EEPROM service life as claimed in claim 1, it is characterised in that institute
Stating method also includes:
If the signal is zero cross signal, without carrying out write operation to the EEPROM.
3. the method for improving EEPROM service life as claimed in claim 1, it is characterised in that institute
Another input for stating micro-control unit is also connected with power circuit, and the power circuit connects alternating current, for alternating current to be become
Power for unidirectional current and then to the micro-control unit.
4. it is a kind of improve EEPROM service life device, it is characterised in that described device include according to
The secondary zero cross detection circuit being linked in sequence, micro-control unit and EEPROM, wherein,
The input connection alternating current of the zero cross detection circuit, for detecting the break-make of alternating current and being sent to break-make information
The micro-control unit;
The input of the micro-control unit connects the outfan of the zero cross detection circuit, for detect exchange electrically disconnected
When, controlling the EEPROM carries out immediately write operation, and deposits by the way that the electric erazable programmable is read-only
The write operation record current operating state data of reservoir when next electric in case use.
5. the device of EEPROM service life is improved as claimed in claim 4, it is characterised in that institute
Micro-control unit is stated, is additionally operable to when detecting exchange and electrically connecting, without carrying out to the EEPROM
Write operation.
6. the device of EEPROM service life is improved as claimed in claim 5, it is characterised in that institute
Zero cross detection circuit is stated including first resistor, the first diode, photoelectrical coupler and second resistance, wherein,
The live wire or zero line of the input connection alternating current of the first resistor, the outfan connection of the first resistor is described
The first input end of photoelectrical coupler;
The plus earth of first diode, the negative pole of first diode connects the outfan of the first resistor;
Second input of the photoelectrical coupler connects the positive pole of first diode;
First outfan of the photoelectrical coupler connects the input of the second resistance, and the first of the photoelectrical coupler is defeated
Go out end while being also connected with the input of the micro-control unit;
Second output head grounding of the photoelectrical coupler.
7. the device of EEPROM service life is improved as claimed in claim 4, it is characterised in that institute
Stating device also includes power circuit, and the power circuit connects alternating current, for alternating current to be changed into into unidirectional current and then to described
Micro-control unit is powered.
8. the device of EEPROM service life is improved as claimed in claim 7, it is characterised in that institute
Power circuit is stated including plug, power supply chip, electrochemical capacitor and the first electric capacity, wherein,
One end connection alternating current of the plug, and 12 volts of unidirectional currents are exported by the change-over circuit of AC/DC, the plug
First outfan exports the input of 12 volts of unidirectional currents to the power supply chip, the second output head grounding of the plug;
The outfan of the power supply chip is connected with one end of the electrochemical capacitor, and the other end connection of the electrochemical capacitor is described
The earth terminal of power supply chip;
One end of first electric capacity connects the outfan of the power supply chip, and the other end of first electric capacity connects the electricity
The earth terminal of source chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611040478.2A CN106601299A (en) | 2016-11-22 | 2016-11-22 | Method and device for improving service life of electrically erasable programmable read-only memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611040478.2A CN106601299A (en) | 2016-11-22 | 2016-11-22 | Method and device for improving service life of electrically erasable programmable read-only memory |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106601299A true CN106601299A (en) | 2017-04-26 |
Family
ID=58592865
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611040478.2A Pending CN106601299A (en) | 2016-11-22 | 2016-11-22 | Method and device for improving service life of electrically erasable programmable read-only memory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106601299A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112634964A (en) * | 2020-12-24 | 2021-04-09 | 潍柴动力股份有限公司 | Data writing method, device and equipment of electronic control unit and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130268797A1 (en) * | 2012-04-06 | 2013-10-10 | Xing-Hua Tang | Power-off protection circuit and electronic device with power-off protection circuit |
CN204155096U (en) * | 2014-09-12 | 2015-02-11 | 广东美的厨房电器制造有限公司 | Electricity cooking pot and power interruption recovering device thereof |
CN105280231A (en) * | 2015-07-23 | 2016-01-27 | 深圳市振邦智能科技有限公司 | Method and apparatus for reducing erasure/write frequency of EEPROM |
-
2016
- 2016-11-22 CN CN201611040478.2A patent/CN106601299A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130268797A1 (en) * | 2012-04-06 | 2013-10-10 | Xing-Hua Tang | Power-off protection circuit and electronic device with power-off protection circuit |
CN204155096U (en) * | 2014-09-12 | 2015-02-11 | 广东美的厨房电器制造有限公司 | Electricity cooking pot and power interruption recovering device thereof |
CN105280231A (en) * | 2015-07-23 | 2016-01-27 | 深圳市振邦智能科技有限公司 | Method and apparatus for reducing erasure/write frequency of EEPROM |
Non-Patent Citations (2)
Title |
---|
李朝青等: "《新型电源IC技术手册》", 31 October 2012 * |
赵依军等: "《单片微机接口技术》", 31 March 1989 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112634964A (en) * | 2020-12-24 | 2021-04-09 | 潍柴动力股份有限公司 | Data writing method, device and equipment of electronic control unit and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104767260B (en) | Charger, terminal unit and charging system | |
CN103151658B (en) | Data connecting line, for the control method of data connecting line and device | |
CN206573680U (en) | A kind of multi-channel circuit test device | |
CN104701583A (en) | Battery charging method based on USB interface, adapter, electric equipment and system | |
CN208015355U (en) | A kind of temperature protection circuit | |
CN101989749A (en) | Charging device and charging method | |
CN102156237A (en) | Method and device for detecting automotive harnesses | |
CN105277320A (en) | Liquid leakage detection sensor and system | |
CN201955387U (en) | Zero-crossing detecting circuit with low power consumption for carrier wave communication | |
CN208109980U (en) | USB on off test device and its system | |
CN103379421B (en) | The working state detecting method of digital microphone channel selecting pin and device | |
CN105172612A (en) | Device for detecting connecting state of charging equipment and electric automobile | |
CN201563242U (en) | Identifier for mobile communication terminal chargers | |
CN106601299A (en) | Method and device for improving service life of electrically erasable programmable read-only memory | |
CN104730479A (en) | Current sensor detection device and method | |
CN106326717A (en) | Equipment instrumented identity controller | |
CN107332292A (en) | A kind of voltage collection circuit and circuit control method | |
CN102967788A (en) | Line broken detection circuit of battery and detection method thereof | |
CN209486164U (en) | Microcontroller power supply low-voltage detection circuit without A D interface and internal reference voltage | |
CN204464655U (en) | A kind of data wire, recognition device and charger | |
CN209281387U (en) | Plug the lighting jig of control circuit and display panel | |
CN212658776U (en) | Power-on protection device and test system of communication module | |
CN105119118A (en) | USB charging line | |
CN206270437U (en) | Open-short circuit system between one kind is point-to-point | |
CN101521395B (en) | Multifunctional input terminal and method thereof |
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: 20170426 |