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.
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
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- What are the categories of current sources? You will know after reading these
- Newcomer Registration
- Questions about the PIOR register of Renesas MCU R7F0C004
- I have a LPV821 chip in my hand, and the teacher asked me to compare the package size
- Share: [G-Non-contact object size and shape measurement] G-Fuzhou University-Non-contact object shape measurement
- ADC_DAC Basics
- [Help] How should I set the pull-up or pull-down resistor for ZYNQ's MIO?
- Show off the development board of ON Semiconductor's Internet of Things Innovation Design Competition!
- How to use Labview to perform secondary development on Ginkgo 2
- Looking forward to the review of the Yatli series~