Application of I2C Serial EEPROM Devices in Embedded Control Systems

Publisher:量子启示Latest update time:2018-02-13 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    I2C serial EEPROM memory is widely used in embedded control systems for storing configuration parameters, adjustment and operation data, etc., due to its small size, compact and simple interface, small pin resource occupation, reliable data storage, online rewriteability, low power consumption and low price. However, due to its synchronous serial transmission, the communication protocol is very simple and does not provide more complex error correction and detection mechanisms. In practice, improper use often causes data loss and data rewrite. For systems with very high requirements for data storage, such as metering products and unattended systems, if unexpected errors occur in the stored data, the loss is fatal. Therefore, when designing and using I2C serial EEPROM memory, it is more necessary to combine hardware and software and take some relevant processing measures to enable the product to operate reliably and correctly in various harsh environments.

1 Hardware processing measures

During the hardware processing process, the following aspects should be considered:

(1) Power supply is the cornerstone of reliable operation of a control system. The wired connection between many products and the outside world is the power connection. Therefore, when designing a product, the power supply circuit should be effectively filtered, and EMC tests should be performed to reduce power supply ripple noise, suppress the intrusion of high-frequency oscillations and high-voltage pulses, and reduce I2C serial EEPROM device read and write errors caused by excessive noise. This is particularly important because in practice, many system data have errors for some reason. One important reason may be that the power supply has limited anti-interference ability, which leads to I2C bus interference.

(2) Due to special reasons, although the power supply has been effectively processed, electromagnetic interference cannot be avoided. When using I2C serial EEPROM, under the restrictions of the I2C specification, measures such as reducing the pull-up resistor and using the I2C bus driver to improve the output drive capability can be taken to effectively reduce the impact of electromagnetic interference on reading and writing.

(3) I2C serial EEPROMs generally have undervoltage reset circuits. If the threshold voltage of the microprocessor undervoltage reset is higher than that of the I2C serial EEPROM, then due to the voltage fluctuation caused by electromagnetic interference, the microprocessor may be reset first during the bus communication process, while the I2C serial EEPROM maintains its current state, causing the bus to "hang", resulting in asynchronous data transmission and data errors. Therefore, microprocessors with power-off detection functions should be used as much as possible, and the microprocessor power-off reset threshold voltage should be set lower than the undervoltage reset threshold of the I2C serial EEPROM, so that the microprocessor and I2C serial EEPROM can be reset synchronously [1]. (4) To prevent the bus from accidentally "hanging", if the design allows, it is best to control the power supply of the I2C device or select a device with a reset pin. (5) For I2C serial EEPROMs with write protection function, the write protection pin can be fully utilized to provide hardware write protection function. The write protection pin can be connected to the I/O port line of the microprocessor to control the device to be in a write protection state at ordinary times; when writing is required, the write protection pin is changed to logic "0". Note that the write protection pin cannot be left floating, otherwise the device will not work properly. 2 Software processing measures While ensuring the reliability of the hardware circuit design, it is equally important to improve the anti-interference ability of the software. When reading and writing the I2C serial EEPROM, the reliability design should be carried out from two aspects. First, the integrity and effectiveness of the I2C bus communication should be guaranteed, and secondly, the correctness of the I2C serial EEPROM read and write data should be guaranteed. 2.1 Measures to ensure the integrity and effectiveness of the I2C bus communication 2.1.1 Bus reset As mentioned earlier, during the I2C bus communication process, electromagnetic interference and other factors may cause the bus to "hang" or communication failure. Therefore, before starting the communication, the I2C serial EEPROM device should be reset to ensure that the I2C bus is in a smooth state. For devices with a reset pin, a reset signal is provided to reset it again; for devices without a reset pin, if the circuit design can control its power supply, the device is powered on and reset; if the device power supply cannot be controlled, the "recovery sequence" reset is started. The recovery sequence operation flow is as follows:     (1) Send 9 clock pulses on the SCL line;     (2) The Master keeps the SDA line high until the Slave-Transmitter mode releases SDA to perform an ACK operation;     (3) During the ACK operation, the SDA line is kept high;     (4) After both the Master-Receiver and Slave-Transmitter modes are completed, the Master sends a Stop command to complete the initialization of the bus [1]. The recovery sequence is shown in Figure 1.





















1 copy.jpg

Reference address:Application of I2C Serial EEPROM Devices in Embedded Control Systems

Previous article:Hardware circuit design of digital PDA system based on STM32 processor
Next article:Implementation of H.264 Video Hardware Codec Based on FFmpeg on S3C6410 Processor

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号