CN103309814B - The storage means of odometry data of automobile in EEPROM - Google Patents

The storage means of odometry data of automobile in EEPROM Download PDF

Info

Publication number
CN103309814B
CN103309814B CN201310194940.4A CN201310194940A CN103309814B CN 103309814 B CN103309814 B CN 103309814B CN 201310194940 A CN201310194940 A CN 201310194940A CN 103309814 B CN103309814 B CN 103309814B
Authority
CN
China
Prior art keywords
data
addrbase
address
mod
addr
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.)
Active
Application number
CN201310194940.4A
Other languages
Chinese (zh)
Other versions
CN103309814A (en
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.)
Aerospace Hi Tech Holding Group Co Ltd
Original Assignee
Aerospace Hi Tech Holding Group 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 Aerospace Hi Tech Holding Group Co Ltd filed Critical Aerospace Hi Tech Holding Group Co Ltd
Priority to CN201310194940.4A priority Critical patent/CN103309814B/en
Publication of CN103309814A publication Critical patent/CN103309814A/en
Application granted granted Critical
Publication of CN103309814B publication Critical patent/CN103309814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The storage means of odometry data of automobile in EEPROM, belongs to the technical field of memory of EEPROM.The mileage storage means that the invention solves EEPROM in existing automobile instrument can not verify data, once data change by environmental interference or lose, cannot recover; Write with a brush dipped in Chinese ink the time long, affect the problem of the operational efficiency of program.Setting Mod is stored data divided by the integer after 16; Judge whether stored data is zero divided by the remainder after 16; If non-vanishing, Mod=Mod+1; Try to achieve the value of address data memory side-play amount Addr, Addr equals (stored data-1) divided by the remainder after 16; Mod is stored in the memory address that Addr+AddrBase determines; AddrBase is base address, is the memory address of first data; After storage completes, read data Temp in Addr+AddrBase address; Carry out reading to judge, if the data of the data write and reading are inconsistent carry out the process of storage data exception.Mileage number is stored in 16 addresses by the present invention, and each unit is 62500 times by the number of times write with a brush dipped in Chinese ink, and is only 6.3% of its durable number of times.

Description

The storage means of odometry data of automobile in EEPROM
Technical field
The present invention relates to the storage means of a kind of odometry data of automobile in EEPROM, belong to the technical field of memory of EEPROM.
Background technology
Mileage on automobile instrument is concerning most important user, once mileage lose or inaccurate, to the maintenance of vehicle and after sale quality guarantee all have a great impact, along with the develop rapidly of automotive electronic technology, traditional mechanical type mileage counting all replace by electronic type mileage counting, for electronic instrument, mileage is all stored in the EEPROM in instrument, EEPROM, by the impact writing with a brush dipped in Chinese ink number of times and external electromagnetic environment, likely causes the loss of data or storage unit to damage.The EEPROM data storage generally adopted now mostly is opens up fixing unit in EEPROM, after being stored into the number of times set, open up a new unit again to store, avoiding writing with a brush dipped in Chinese ink the life-span that number of times crosses multipair EEPROM impacts, but the shortcoming of the method can not verify data, once data change by environmental interference or lose, cannot recover.In addition, the byte that the storage of data entirety takies is many, writes with a brush dipped in Chinese ink the time long, affects program operational efficiency.
The total kilometrage maximal value generally requiring instrument to store is 999999, if these data to be stored in a fixing address, mileage change once, just data to be write with a brush dipped in Chinese ink in this address once, so this address will be write with a brush dipped in Chinese ink nearly 1,000,000 times, and the life-span of writing with a brush dipped in Chinese ink of EEPROM is only 1,000,000 times.
Summary of the invention
The mileage storage means that the invention solves EEPROM in existing automobile instrument can not verify data, once data change by environmental interference or lose, the problem that cannot recover, solve data global storage to take byte many simultaneously, write with a brush dipped in Chinese ink the time long, affect the problem of program operational efficiency; And then provide the storage means of a kind of odometry data of automobile in EEPROM.
The present invention solves the problems of the technologies described above the technical scheme taked to be:
The storage means of odometry data of automobile in EEPROM, the detailed process of described storage means is:
Step one, setting Mod are stored data (odometry data of automobile) divided by the integer after 16;
Step 2, judge whether stored data is zero divided by the remainder after 16, if non-vanishing (namely stored data can not divide exactly 16) so perform step 3; If be so perform step 4 zero (namely stored data can divide exactly 16);
Step 3, Mod=Mod+1;
Step 4, try to achieve the value of address data memory side-play amount Addr, Addr equals (stored data-1) divided by the remainder after 16;
Step 5, Mod is stored in memory address that Addr+AddrBase determines; Here AddrBase is base address, is the memory address of first data;
Step 6, stored after, read data Temp in Addr+AddrBase address;
Step 7, carry out reading and judge, if the data Mod of write and the data Temp of reading is inconsistent, then perform step 8 again after carrying out the process of storage data exception; Otherwise directly perform step 8;
Step 8, complete storing process.
The invention has the beneficial effects as follows:
Mileage number is stored in 16 addresses by the inventive method, and each like this unit is 62500 times by the number of times write with a brush dipped in Chinese ink, and is only 6.3% of its durable number of times.In addition, the inventive method can verify storage mileage, under normal circumstances, the rule that the data fit in 16 data cells is certain, namely has at most the number that two kinds different in 16 data cells, different several if there is 3 kinds, confirm exception, can verify by storing rule, method of calibration is various, can using numbers maximum for occurrence number as valid data, be stored in 16 unit, also can using two of a hop place data as valid data.Meanwhile, the inventive method is judged by verification, if certain unit storing mileage damages, again will open up a continuous print 16 EEPROM unit, mileage is stored in new unit, and the data of impaired loss is recovered by verification.
After data are divided into 16 unit by the inventive method, it is relatively little that the byte length of each unit can be arranged, and only needs the data storing one of them unit at every turn, and the time stored in EEPROM data like this shortens greatly, improves the operational efficiency of program.
Accompanying drawing explanation
Fig. 1 is memorying data flow journey block diagram of the present invention, and Fig. 2 is the FB(flow block) of the storage data exception processing procedure in Fig. 1, and Fig. 3 is the FB(flow block) reading data check process.
Embodiment
Embodiment one: as shown in Figure 1, the detailed process of the storage means of a kind of odometry data of automobile in EEPROM described in present embodiment is:
Step one, setting Mod are stored data (odometry data of automobile) divided by the integer after 16;
Step 2, judge whether stored data is zero divided by the remainder after 16, if non-vanishing (namely stored data can not divide exactly 16) so perform step 3; If be so perform step 4 zero (namely stored data can divide exactly 16);
Step 3, Mod=Mod+1;
Step 4, try to achieve the value of address data memory side-play amount Addr, Addr equals (stored data-1) divided by the remainder after 16;
Step 5, Mod is stored in memory address that Addr+AddrBase determines; Here AddrBase is base address, is the memory address of first data;
Step 6, stored after, read data Temp in Addr+AddrBase address;
Step 7, carry out reading and judge, if the data Mod of write and the data Temp of reading is inconsistent, then perform step 8 again after carrying out the process of storage data exception; Otherwise directly perform step 8;
Step 8, complete storing process.
Embodiment two: as depicted in figs. 1 and 2, in present embodiment, storage data exception process in step 7 causes read-write error to distinguish the damage of EEPROM unit or being interfered, in storage data exception treatment scheme, add 8 read-writes judge, if 8 read-writes all failures, think that EEPROM unit is damaged, need again to open up a continuous print 16 EEPROM unit, mileage is stored in new unit; Detailed process is:
Step 1, i=0
Step 2, by Mod stored in Addr+AddrBase memory address;
Data Temp in step 3, reading Addr+AddrBase address;
Step 4, judge write data Mod whether consistent with the data Temp of reading, if so, execution step 10; Otherwise perform step 5;
The value of step 5, increase i;
Step 6, judge whether i is less than 8, if be back to step 2; Otherwise perform step 7;
Step 7, initial for AddrBase address 16 data are put into the address that (AddrBase+16) is start address;
Step 8, AddrBase=AddrBase+16;
Step 9, by Mod stored in Addr+AddrBase address;
Step 10, storage data exception processing procedure terminate.
Other step is identical with embodiment one.
Embodiment three: as shown in Figure 3, described in present embodiment, method also comprises step 9, and read the step of data check, its detailed process is as follows:
Step 9 (1), be start address with AddrBase, read 16 data;
Step 9 (2), inconsistent some quantity statistics is carried out to the data of step 9 (1);
Step 9 (3), judge whether inconsistent quantity is greater than 1, if it is perform step 9 (4), otherwise perform step 9 (5);
Step 9 (4), using the data of maximum consistent point as significant figure, verify data in other positions;
Step 9 (5), 16 data are added draw total kilometrage data, terminate the step reading data check.
Other step is identical with embodiment one or two.
Embodiment: memorying data flow journey illustrates:
Mod is stored data divided by the integer after 16
If data can divide exactly 16 so Mod=Mod+1;
Address data memory Addr is (data-1) divided by the remainder after 16
Be stored into by Mod in Addr+AddrBase, AddrBase is base address here, is exactly the memory address of first data.
After storage completes, carry out reading and judge, if the data of the data write and reading are inconsistent, then call and store data exception treatment scheme;
Read-write error is caused in order to distinguish the damage of EEPROM unit or be interfered, in storage data exception treatment scheme, add 8 read-writes judge, if 8 read-writes all failures, think that EEPROM unit is damaged, need from newly opening up a continuous print 16 EEPROM unit, mileage is stored in new unit.
Current mileage number is 15, then the data in 16 unit are as follows
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 0
Current mileage number is 16, then the data in 16 unit are as follows
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
Current mileage number is 17, then the data in 16 unit are as follows
2 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
Current mileage number is 18, then the data in 16 unit are as follows
2 2 1 1 1 1 1 1
1 1 1 1 1 1 1 1
Find out from above data, under normal circumstances, the rule that data fit in 16 data cells is certain, namely the number that two are different is had at most in 16 data cells, different several if there is 3, confirming exception, can verify by storing rule, method of calibration is various, can, using numbers maximum for occurrence number as valid data, be stored in 16 unit, also can using two of a hop place data as valid data.

Claims (3)

1. the storage means of odometry data of automobile in EEPROM, is characterized in that: the detailed process of described storage means is:
Step one, setting Mod are odometry data of automobile divided by the integer after 16;
Step 2, judge whether odometry data of automobile is zero divided by the remainder after 16, so performs step 3 if non-vanishing; If be zero so perform step 4;
Step 3, Mod=Mod+1;
Step 4, try to achieve the value of address data memory side-play amount Addr, Addr=mod [(odometry data of automobile-1), 16];
Step 5, Mod is stored in memory address that Addr+AddrBase determines; Wherein AddrBase is base address, is the memory address of first data;
Step 6, stored after, read data Temp in Addr+AddrBase address;
Step 7, carry out reading and judge, if the data Mod of write and the data Temp of reading is inconsistent, then perform step 8 again after carrying out the process of storage data exception; Otherwise directly perform step 8;
Step 8, complete storing process.
2. the storage means of a kind of odometry data of automobile according to claim 1 in EEPROM, it is characterized in that: the storage data exception process in step 7 causes read-write error to distinguish the damage of EEPROM unit or being interfered, in storage data exception treatment scheme, add 8 read-writes judge, if 8 read-writes all failures, think that EEPROM unit is damaged, again open up a continuous print 16 EEPROM unit, odometry data of automobile is stored in new unit; Detailed process is:
Step 1, i=0
Step 2, by Mod stored in Addr+AddrBase memory address;
Data Temp in step 3, reading Addr+AddrBase address;
Step 4, judge write data Mod whether consistent with the data Temp of reading, if so, execution step 10; Otherwise perform step 5;
Step 5, i=i+1;
Step 6, judge whether i is less than 8, if be back to step 2; Otherwise perform step 7;
Step 7, initial for AddrBase address 16 data are put into the address that AddrBase+16 is start address;
Step 8, AddrBase=AddrBase+16;
Step 9, by Mod stored in Addr+AddrBase address;
Step 10, storage data exception processing procedure terminate.
3. the storage means of a kind of odometry data of automobile according to claim 1 and 2 in EEPROM, is characterized in that: described method also comprises step 9, and read the step of data check, its detailed process is as follows:
Step 9 (1), be start address with AddrBase, read 16 data;
Step 9 (2), inconsistent some quantity statistics is carried out to the data of step 9 (1);
Step 9 (3), judge whether inconsistent quantity is greater than 1, if it is perform step 9 (4), otherwise perform step 9 (5);
Step 9 (4), using the data of maximum consistent point as significant figure, verify data in other positions;
Step 9 (5), 16 data are added draw odometry data of automobile, terminate the step reading data check.
CN201310194940.4A 2013-05-23 2013-05-23 The storage means of odometry data of automobile in EEPROM Active CN103309814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310194940.4A CN103309814B (en) 2013-05-23 2013-05-23 The storage means of odometry data of automobile in EEPROM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310194940.4A CN103309814B (en) 2013-05-23 2013-05-23 The storage means of odometry data of automobile in EEPROM

Publications (2)

Publication Number Publication Date
CN103309814A CN103309814A (en) 2013-09-18
CN103309814B true CN103309814B (en) 2015-10-14

Family

ID=49135061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310194940.4A Active CN103309814B (en) 2013-05-23 2013-05-23 The storage means of odometry data of automobile in EEPROM

Country Status (1)

Country Link
CN (1) CN103309814B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978534A (en) * 2014-04-11 2015-10-14 大陆汽车车身电子系统(芜湖)有限公司 Method and system for preventing vehicle mileage tampering
CN105741881A (en) * 2016-01-28 2016-07-06 浙江绍兴苏泊尔生活电器有限公司 Storage verification method for static storage area
CN112380059B (en) * 2020-11-13 2024-02-23 武汉蓝星科技股份有限公司 Method and system for storing mileage information of vehicle instrument
CN112667433B (en) * 2021-01-27 2022-06-17 安徽天健环保车辆部件有限公司 Data calibration deviation correction method for mileage of automobile instrument
CN113010118B (en) * 2021-03-25 2022-09-16 四川百纳科技有限责任公司 Method for processing mileage and hour meter data stored in automobile

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043722A (en) * 2010-12-30 2011-05-04 重庆长安汽车股份有限公司 Automobile total mileage storage method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004062328A (en) * 2002-07-25 2004-02-26 Renesas Technology Corp Flash storage medium loading nand-type flash memory

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043722A (en) * 2010-12-30 2011-05-04 重庆长安汽车股份有限公司 Automobile total mileage storage method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于单片机的汽车里程表设计;刘清波等;《河北大学学报》;20020930;第22卷(第3期);276-278 *
汽车里程数据的存储算法研究;洪运富等;《仪表技术》;20071105(第9期);26-28 *

Also Published As

Publication number Publication date
CN103309814A (en) 2013-09-18

Similar Documents

Publication Publication Date Title
CN103309814B (en) The storage means of odometry data of automobile in EEPROM
CN105740157B (en) data storage device and flash memory control method
CN101874240B (en) Increasing a lifetime of a plurality of blocks of memory
CN105122373A (en) Word line defect detection and handling for a data storage device
CN101419841B (en) Erasing method for FLASH memory
CN103578565A (en) Calibration method and device of NAND Flash memory chip
WO2009072101A2 (en) Apparatus and methods for generating row-specific reading thresholds in flash memory
US9514843B2 (en) Methods for accessing a storage unit of a flash memory and apparatuses using the same
CN104094355B (en) The apparatus and method being programmed using adjustable state of charge level to memory cell
CN104282342A (en) Flash memory device, memory controller and control method of flash memory
CN103106143A (en) Solid storing device and logic-to-entity corresponding table establishment method thereof
CN103823642A (en) Method and system used for Flash balance storage
CN103116550A (en) Method and device for switching physical block work mode in flash memory
CN104794063A (en) Method for controlling solid state drive with resistive random-access memory
CN111192620A (en) Method for optimizing NAND Flash read reference voltage in SSD
CN103914667A (en) Safety electrically erasable programmable read only memory (EEPROM) reading method and system thereof
CN105843700B (en) Controller
US20130151752A1 (en) Bit-level memory controller and a method thereof
CN106648948B (en) Method for repairing damage of Western digital hard disk No. 11 module
US20090164869A1 (en) Memory architecture and configuration method thereof
CN104166627B (en) A kind of SCM Based NAND FLASH write operation methods
CN112347001A (en) Flash memory garbage recovery verification method and device and electronic equipment
CN107678977B (en) Reading and writing method and device of counter
CN102722456B (en) Flash memory device and data writing method thereof
CN102736981B (en) Improve the method for NOR FLASH erase/write life

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant