CN105022701A - Method for storing running state and parameters of air conditioner - Google Patents
Method for storing running state and parameters of air conditioner Download PDFInfo
- Publication number
- CN105022701A CN105022701A CN201510445964.1A CN201510445964A CN105022701A CN 105022701 A CN105022701 A CN 105022701A CN 201510445964 A CN201510445964 A CN 201510445964A CN 105022701 A CN105022701 A CN 105022701A
- Authority
- CN
- China
- Prior art keywords
- data
- address
- write
- dataflash
- parameter
- 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.)
- Granted
Links
Abstract
The present invention discloses a method for storing a running state and parameters of an air conditioner and relates to the technical field of power failure state memory and power recovery in the running process of the air conditioner. Particularly, a DATAFLASH is arranged in a singlechip; a reading/writing algorithm is designed; a function of writing in or reading out data at any time of the DATAFLASH is realized; and the DATAFLASH realizes the maximum writing times in the limited erasing times. The present invention provides the new method for storing the running parameters of the air conditioner, which realizes the same storage demand and function, replaces a conventional external storage device mode and saves a certain cost for electric control design of the air conditioner. Meanwhile, the problem that the total read-write times of the built-in DATAFLASH is smaller than that of an external EEPROM is solved by the algorithm described by the method, so that the built-in DATAFLASH is superior to the external EEPROM on the aspects of storage times, the service life and the like.
Description
Technical field
The present invention relates to power-down state memory and incoming call recovery technology field, the particularly storage means of conditioners running conditions and parameter in air conditioner operational process.
Background technology
State in current air conditioner operational process and the storage of parameter, the main EEPROM (Electrically Erasable Read Only Memory) external by a slice, its model and Capacity Selection more, use and be also not difficult.But, due to its external property, need to reserve when fabric swatch a certain size space of pcb board, add the complicacy of hardware design; Also occupy MCU two I/O mouths simultaneously, add the consumption of its limited resources; Add other components and parts of periphery, use external EEPROM to store data, add the holistic cost that air conditioner is automatically controlled to a certain extent.
Summary of the invention
The object of the invention is to overcome the deficiency in above-mentioned background technology, provide a kind of new method to store the operational factor of air conditioner, realize identical storage demand and function, substitute traditional external memory part mode, for certain cost is saved in the automatically controlled design of air conditioner.Meanwhile, solve built-in DATAFLASH by algorithm described in the invention and totally read and write the number of times problem lower than external EEPROM, make its storage number of times and serviceable life etc. in be all better than external memory.
In order to reach above-mentioned technique effect, the present invention takes following technical scheme: the storage means of conditioners running conditions and parameter, it is characterized in that: built-in DATAFLASH on single-chip microcomputer, design read/write algorithm, realize DATAFALSH to write at any time or the function of sense data, and make DATAFLASH in limited erasing times, realize maximum write number of times.The DATAFLASH storage space that the present invention utilizes MCU built-in, read/write algorithm reasonable in design, realizes memory and the reading of air conditioner state parameter, reaches the storage effect the same with external EEPROM.Concrete, after opening built-in DATAFLASH operation, by read/write algorithm operated in turn address field described in the invention, realize the correct writing and reading of air conditioner state parameter, reduce overall erasable number of times, increase number of operations and the serviceable life of built-in DATAFLASH, reach and even surmount the external eeprom memory demand in serviceable life of air conditioner.
Further technical scheme is: described read/write algorithm adopts the wiring method of subregion to write data in turn, until perform Integratively erase operation again when built-in DATAFLASH one page is fully written.
Further technical scheme is: described read/write algorithm designs according to following steps:
S1, one page of DATAFLASH is divided into 3 regions, is followed successively by data storage area, marker space, data directory district;
S2, detection index data record number, obtain up-to-date index value;
S3, calculate Newest Data Address according to up-to-date index value;
S4, the data finally recorded from Newest Data Address reading, as the data that last time preserves;
S5, calculate remaining space size according to current up-to-date index value and Newest Data Address pointer, if when remaining space is not enough, first performs page erase operation, after reinitializing index and address, perform write operation again; If address space left space is sufficient, then the data of the current state-of-the-art record that writes direct.Further, the difference < data length value+2 of current up-to-date index value and Newest Data Address, then remaining space is not enough, otherwise remaining space is sufficient.Further, described data length value is 16 bytes.
Further technical scheme is: each write data all need to upgrade concordance list and data address.Manage the address pointer of read/write data according to concordance list, every bar index increases from high address to low address successively according to 2 bytes, and the first byte is index value, and the second byte is the radix-minus-one complement of index value; Every bar data, according to the data length value of 16 bytes, increase successively from low address to high address.
Further technical scheme is: length is the data of 16 bytes, and often write performs once page erase operation for 55 times.100,000 erasing and writing lifes preserved 5 years according to built-in DATAFLASH data calculate, and can realize the data read-write operation of 5,500,000 times, exceed the life-span of external EEPROM according to the method.
The present invention compared with prior art, has following beneficial effect: the method designed by the present invention uses built-in DATAFLASH storer, can remove external eeprom memory, saves the holistic cost of cost of hardware design and air conditioner electronic development.Meanwhile, because this DATAFLASH memory built-in is inner in MCU, make the speed of read-write faster, reliability is higher.Storage space is larger simultaneously, overall longer service life.
Accompanying drawing explanation
Fig. 1 is built-in DATAFLASH Fragmentation schematic diagram;
Fig. 2 uses outside EEPROM to store schematic diagram data;
Fig. 3 is built-in DATAFLASH read data algorithm flow chart;
Fig. 4 is that built-in DATAFLASH writes data algorithm process flow diagram in turn.
Embodiment
Below in conjunction with embodiments of the invention, the invention will be further elaborated.
Embodiment:
When using built-in DATAFALSH, air conditioner electric-controlled plate MCU outside does not need extra eeprom memory.Only need increase the read/write operation api function to inner DATAFALSH in air conditioner control program, realize the function of write or sense data at any time.
As shown in Fig. 1, Fig. 3, Fig. 4, the function according to following steps design read/write algorithm:
Step 1: the built-in DATAFLASH state of initialization, allows the associative operations such as read/write; One page of DATAFLASH is divided into 3 regions, is followed successively by data storage area, marker space, and data directory district, each write data all need to upgrade concordance list and data address.
Step 2: detect index data record number, obtain up-to-date index value.
Step 3: calculate Newest Data Address according to up-to-date index value.The address pointer of read/write data is managed according to concordance list.Every bar index increases from high address to low address successively according to 2 bytes, and the first byte is index value, and the second byte is the radix-minus-one complement of index value; Every bar data, according to the data length value of 16 bytes, increase successively from low address to high address.
Step 4: the data reading last record from Newest Data Address, as the data that last time preserves, data are before ignored.
Step 5: during write data, first calculates residue blank addresses space, if when address space left space is inadequate, first performs page erase operation, performs write operation again after reinitializing index and address.If address space left space is sufficient, then the data of the current state-of-the-art record that writes direct.The difference < data length value+2 of current up-to-date index value and Newest Data Address, then remaining space is not enough, otherwise remaining space is sufficient.
Step 6: the School Affairs of data uses.
As shown in Figure 2, the present invention uses built-in DATAFLASH storer, can remove external eeprom memory, save the holistic cost of cost of hardware design and air conditioner electronic development, meanwhile, because this DATAFLASH memory built-in is inner in MCU, make the speed of read-write faster, reliability is higher.Storage space is larger simultaneously, overall longer service life.
Be understandable that, the illustrative embodiments that above embodiment is only used to principle of the present invention is described and adopts, but the present invention is not limited thereto.For those skilled in the art, without departing from the spirit and substance in the present invention, can make various modification and improvement, these modification and improvement are also considered as protection scope of the present invention.
Claims (8)
1. the storage means of conditioners running conditions and parameter, it is characterized in that: built-in DATAFLASH on single-chip microcomputer, design read/write algorithm, realize DATAFALSH and write at any time or the function of sense data, and make DATAFLASH in limited erasing times, realize maximum write number of times.
2. the storage means of conditioners running conditions according to claim 1 and parameter, it is characterized in that: described read/write algorithm adopts the wiring method of subregion to write data in turn, until perform Integratively erase operation again when built-in DATAFLASH one page is fully written.
3. the storage means of conditioners running conditions according to claim 2 and parameter, is characterized in that: described read/write algorithm designs according to following steps:
S1, one page of DATAFLASH is divided into 3 regions, is followed successively by data storage area, marker space, data directory district;
S2, detection index data record number, obtain up-to-date index value;
S3, calculate Newest Data Address according to up-to-date index value;
S4, the data finally recorded from Newest Data Address reading, as the data that last time preserves;
S5, calculate remaining space size according to current up-to-date index value and Newest Data Address pointer, if when remaining space is not enough, first performs page erase operation, after reinitializing index and address, perform write operation again; If address space left space is sufficient, then the data of the current state-of-the-art record that writes direct.
4. the storage means of conditioners running conditions according to claim 3 and parameter, it is characterized in that: according to concordance list to manage the address pointer of read/write data, every bar index increases from high address to low address successively according to 2 bytes, first byte is index value, and the second byte is the radix-minus-one complement of index value; Every bar data, according to the data length value of 16 bytes, increase successively from low address to high address.
5. the storage means of conditioners running conditions according to claim 3 and parameter, it is characterized in that: the difference < data length value+2 of current up-to-date index value and Newest Data Address, then remaining space is not enough, otherwise remaining space is sufficient.
6. the storage means of conditioners running conditions according to claim 5 and parameter, is characterized in that: described data length value is 16 bytes.
7. the storage means of conditioners running conditions according to claim 3 and parameter, is characterized in that: each write data all need to upgrade concordance list and data address.
8. the conditioners running conditions according to any one of claim 3-7 and the storage means of parameter, is characterized in that: length is the data of 16 bytes, and often write performs once page erase operation for 55 times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510445964.1A CN105022701B (en) | 2015-07-27 | 2015-07-27 | The storage method of conditioners running conditions and parameter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510445964.1A CN105022701B (en) | 2015-07-27 | 2015-07-27 | The storage method of conditioners running conditions and parameter |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105022701A true CN105022701A (en) | 2015-11-04 |
CN105022701B CN105022701B (en) | 2018-03-23 |
Family
ID=54412689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510445964.1A Active CN105022701B (en) | 2015-07-27 | 2015-07-27 | The storage method of conditioners running conditions and parameter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105022701B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095338A (en) * | 2016-06-13 | 2016-11-09 | 深圳创维空调科技有限公司 | The erasable implementation method of a kind of memory chip and realize system |
CN108629927A (en) * | 2017-03-23 | 2018-10-09 | 惠尔丰(中国)信息系统有限公司 | A kind of optimization method of the memory of low dump machine |
CN109976676A (en) * | 2019-04-02 | 2019-07-05 | 苏州和欣致远节能科技有限公司 | A method of it promoting cumulative amount and number is written |
CN110389723A (en) * | 2019-07-22 | 2019-10-29 | 广东美的制冷设备有限公司 | Storage method, device, air conditioner and the storage medium of data |
CN112074904A (en) * | 2018-04-30 | 2020-12-11 | 美光科技公司 | Memory start-up voltage management |
CN113157212A (en) * | 2021-04-23 | 2021-07-23 | 歌尔股份有限公司 | Flash storage method and device, intelligent wearable device and storage medium |
CN113419974A (en) * | 2021-06-25 | 2021-09-21 | 长虹美菱股份有限公司 | Control method for prolonging power-off memory times of refrigerator |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090222620A1 (en) * | 2008-02-29 | 2009-09-03 | Tatsunori Kanai | Memory device, information processing apparatus, and electric power controlling method |
CN101551780A (en) * | 2008-12-29 | 2009-10-07 | 深圳创维-Rgb电子有限公司 | Television and data storage method and device thereof |
CN102339254A (en) * | 2011-06-17 | 2012-02-01 | 杭州炬华科技股份有限公司 | Flash data storage method for intelligent electric energy meter |
CN102455973A (en) * | 2010-10-19 | 2012-05-16 | 厦门华侨电子股份有限公司 | Method for setting data field to erase data by using residual space of Flash chip |
CN102662852A (en) * | 2012-03-20 | 2012-09-12 | 山东省科学院自动化研究所 | Method for storing nonvolatile data by using MCU internal data Flash |
-
2015
- 2015-07-27 CN CN201510445964.1A patent/CN105022701B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090222620A1 (en) * | 2008-02-29 | 2009-09-03 | Tatsunori Kanai | Memory device, information processing apparatus, and electric power controlling method |
CN101551780A (en) * | 2008-12-29 | 2009-10-07 | 深圳创维-Rgb电子有限公司 | Television and data storage method and device thereof |
CN102455973A (en) * | 2010-10-19 | 2012-05-16 | 厦门华侨电子股份有限公司 | Method for setting data field to erase data by using residual space of Flash chip |
CN102339254A (en) * | 2011-06-17 | 2012-02-01 | 杭州炬华科技股份有限公司 | Flash data storage method for intelligent electric energy meter |
CN102662852A (en) * | 2012-03-20 | 2012-09-12 | 山东省科学院自动化研究所 | Method for storing nonvolatile data by using MCU internal data Flash |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095338A (en) * | 2016-06-13 | 2016-11-09 | 深圳创维空调科技有限公司 | The erasable implementation method of a kind of memory chip and realize system |
CN108629927A (en) * | 2017-03-23 | 2018-10-09 | 惠尔丰(中国)信息系统有限公司 | A kind of optimization method of the memory of low dump machine |
CN112074904A (en) * | 2018-04-30 | 2020-12-11 | 美光科技公司 | Memory start-up voltage management |
CN112074904B (en) * | 2018-04-30 | 2022-04-01 | 美光科技公司 | Memory start-up voltage management |
CN109976676A (en) * | 2019-04-02 | 2019-07-05 | 苏州和欣致远节能科技有限公司 | A method of it promoting cumulative amount and number is written |
CN109976676B (en) * | 2019-04-02 | 2022-04-05 | 苏州和欣致远节能科技有限公司 | Method for increasing cumulative number of write-in times |
CN110389723A (en) * | 2019-07-22 | 2019-10-29 | 广东美的制冷设备有限公司 | Storage method, device, air conditioner and the storage medium of data |
CN113157212A (en) * | 2021-04-23 | 2021-07-23 | 歌尔股份有限公司 | Flash storage method and device, intelligent wearable device and storage medium |
CN113157212B (en) * | 2021-04-23 | 2023-02-28 | 歌尔股份有限公司 | Flash storage method and device, intelligent wearable device and storage medium |
CN113419974A (en) * | 2021-06-25 | 2021-09-21 | 长虹美菱股份有限公司 | Control method for prolonging power-off memory times of refrigerator |
CN113419974B (en) * | 2021-06-25 | 2024-02-06 | 长虹美菱股份有限公司 | Control method for prolonging power-off memory times of refrigerator |
Also Published As
Publication number | Publication date |
---|---|
CN105022701B (en) | 2018-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105022701A (en) | Method for storing running state and parameters of air conditioner | |
US10915475B2 (en) | Methods and apparatus for variable size logical page management based on hot and cold data | |
US8291155B2 (en) | Data access method, memory controller and memory storage system | |
TWI506430B (en) | Method of recording mapping information method, and memory controller and memory storage apparatus using the same | |
US8312554B2 (en) | Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus | |
CN102792284B (en) | Memory devices loss equalization technology | |
TWI423024B (en) | Data storing method for a flash memory, and flash memory controller and flash memory storage system using the same | |
US8667234B2 (en) | Data writing method, memory controller, and memory storage apparatus | |
US20170038977A1 (en) | Valid data merging method, memory controller and memory storage apparatus | |
US8516184B2 (en) | Data updating using mark count threshold in non-volatile memory | |
TWI423026B (en) | Data writing method, memory controller and memory storage apparatus | |
WO2014074449A2 (en) | Wear leveling in flash memory devices with trim commands | |
US20130097362A1 (en) | Data writing method, and memory controller and memory storage apparatus using the same | |
JP2013137770A (en) | Lba bitmap usage | |
US20140372668A1 (en) | Data writing method, memory controller and memory storage apparatus | |
US20110004720A1 (en) | Method and apparatus for performing full range random writing on a non-volatile memory | |
CN102135942A (en) | Method for realizing wear-leveling in storage equipment as well as the storage equipment | |
CN106775436B (en) | Data access method, memorizer control circuit unit and memory | |
US20120210075A1 (en) | Memory management method, memory controller and memory storage apparatus | |
US20130013885A1 (en) | Memory storage device, memory controller, and method for identifying valid data | |
TW201945927A (en) | Data writing method, memory control circuit unit and memory storage apparatus | |
CN107045423B (en) | Memory device and data access method thereof | |
WO2019047901A1 (en) | Data depositing method | |
US8762685B2 (en) | Data writing method, memory controller and memory storage apparatus | |
TWI451247B (en) | Data writing method, memory controller and memory storage apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |