According to everywhere I've looked, the 24C02S uses 3 address pins, statically hard wired to set the address of the chip. What if the 24C02S is in a Sot23-5 package? VCC, GND, WP, SCL, SDA are all I have to work with. Datasheets aren't helpful in what to do in this case. Is it a fixed address that can't be set? If so, is it 1010000 or 0x50?
-
3\$\begingroup\$ This Atmel datasheet for a similar device notes: "For use of 5-lead SOT23, the software A2, A1, and A0 bits in the device address word must be set to zero to properly communicate."... Do you know the manufacturer of your specific devices ? \$\endgroup\$– UnimportantAug 7, 2022 at 18:20
-
\$\begingroup\$ @Unimportant No, not at all. But I did try with 0x50 and it worked. I was looking at the microchip and mouser datasheets. Thank you! \$\endgroup\$– PeaserAug 7, 2022 at 18:30
3 Answers
24xx serial eeproms generally follow the addressing shown in this Microchip datasheet.
For SOT23-5 devices, A0..A2 are zero. LSB is ignored (as in right-shifted away) so the address is 0x50 for 1K and 2K devices. The 24C02 is a 2K device.
For larger devices the lower address bits are commandeered to select the memory page so the I2C address might be 0x50 or 0x51 for a 4K device, 0x50, 0x51, 0x52, 0x53 for an 8K device and 0x50..0x57 for a 16K device.
as @Unimportant said, 5 lead i2c eeproms use 0x50.
-
5\$\begingroup\$ The polite option would have been to invite @Unimportant to place his comment as answer and accept it. And, are you really sure, that all 5pin EEPROMs use 0x50? \$\endgroup\$– JensAug 7, 2022 at 19:38
If any of the address lines are changed 0x50 will no longer work assuming they are address lines. However I do not believe they are address lines. You need VCC, Gnd, SCL, SDA, to make it work on I2C. That is 4 pins minimum leaving two more. These can be: 2 address lines, 1 address line and WP, or It is also possible one of the pins is a NC (No Connect) A lot of information on these can be found in the Arduino forums. You can also find schematics and code that will you to test them. My guess is it is a "5-pin" (in 6 pin package), Pinning out 6 pins even if one is a NC makes the board much more useful. AT24C02 which is a 2K SERIAL EEPROM. Internally it is organized with 32 pages of 8 bytes each. You will have to use an an 8-bit data word address for random word addressing. Is it possible to show a section of the schematic that has this part.
-
\$\begingroup\$ It's a 5-pin IC package on a 6-pad footprint. \$\endgroup\$ Aug 7, 2022 at 23:33