Common pitfalls of EEPROM read and write operations

Source: Internet
Author: User

The EEPROM is often used in project development, and now lists the pitfalls and their own solutions that have been encountered in their own development. (1) Phenomenon: The ID of the encrypted remote control is automatically lost and changed.
Cause: During the update of the EEPROM, disconnect the power supply.
Workaround:
A. Change the design to avoid disconnecting the power supply during writing to the EEPROM;
B. Increase the capacitance of 100uF, the instantaneous maintenance of the EEPROM power supply normal to the EEPROM write completion.
(2) Phenomenon: The configuration information stored in the EEPROM is changed automatically.
Cause: In the EEPROM read and write process into the Interrupt service program, and interrupt service program also called the EEPROM read and write function.
Workaround:
A. The first sentence guaranteeing the EEPROM read and write function is the CLI (), and the last sentence is Sei ();
B. The interrupt service program does not call the EEPROM read-write function directly, if the SRAM is large enough to use the read-write buffer instead of the direct read/write EEPROM, the interrupt returns the EEPROM in the main loop;
C. If the EEPROM is detected to be occupied, then go into a blocking state, wait for the EEPROM to be released after the execution;
D. If the data length in the EEPROM is greater than the EEPROM minimum storage unit, it must be guaranteed that the data is read and written without interruption.
(3) Phenomenon: The EEPROM data is occasionally lost when a power outage occurs suddenly. Cause: In the case of a power outage, the EEPROM write operation happens.
Solution: Increase the capacity of the power filter capacitance, add voltage detection function, when the voltage is low, the EEPROM write operation is forbidden.
(4) Phenomenon: When high-power AC or DC motor start or after the EEPROM data automatically lost or changed.
Cause: EMI interference is large in high-power motor starting or disconnecting moment.
Workaround:
A. Avoid reading and writing EEPROM at these times.
B. If you cannot avoid these times, start the EEPROM write protection feature, and save multiple copies of each data.
C. Keep signal lines such as EEPROM and EEPROM dat,clk away from elements that may cause interference, and avoid forming large loops.
D. Use EMI suppression circuitry to reduce interference amplitude

Common pitfalls of EEPROM read and write operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.