Some strange problems were found in the EEPROM test. The device read and write address is not unique.

In the AT24Cxx experiment of EEPROM, it was found that the chip read and write address is not unique . The test is mainly for the AT24C02 and AT24C1024 chips, using the hardware I2C programming of the official firmware library.

Problem description :

Those who have done AT24Cxx know that when AT24Cxx writes data, the program needs to send a 7-bit slave device write address (I2C_Send7bitAddress(I2Cx, WriteAdrr, I2C_Direction_Transmitter);); when reading the address, you need to send a 7-bit slave first. The device write address then winds up the read address of the 7-bit device (I2C_Send7bitAddress(I2Cx, ReadAdrr, I2C_Direction_Receiver);).

However, a problem was found in the address selection. For the AT24C02 and AT24C1024 chips, it was found that the write address and read address were not unique, but were selected by a range. This, normally it should be unique, and normally read and write addresses are 0xAx. x is generally related to the grounding and high level of the chip pins. The last bit is the choice for reading and writing. It is written as 0 and read as 1. But the test results are not like this, as follows:

Test result : The selectable range of the AT24C02 write address (WriteAdrr) in the test is: 0xA0---0xAF.

                    The selectable range of AT24C02 write address (ReadAdrr) in the test is: 0xA0---0xAF.

                    The AT24C1024 write address (WriteAdrr) in the test can only be: 0xA0. (This is normal)

                    The selectable range of the AT24C1024 write address (ReadAdrr) in the test is: 0xA0---0xA3.

As long as you choose according to the above, the chip is successfully reading and writing data. . . +_+ I am really puzzled and cannot explain it, but the result can be realized. If you know the reason, you can leave a message, thank you!

(Note: The address selection pins of AT24C02 and AT24C1024 are all grounded)

Guess you like

Origin blog.csdn.net/ludaoyi88/article/details/50938892