External i2c EEPROM Question.

Danvm

New Member
I have a 28X1 that im trying to design a multi bank EEPROM storage solution for. (not really for practical use, just as an i2c learning experience). Most if not all 24LCxxx parts have the three address pins on them. I have most of the hardware part down, and as for the software end, i've hit a wall, i scoured google and couldn't find info anywhere.

i need to know how the relation between the pins and the software address works. Is it a simple binary system? If tying all three pins low gives you address 0, would pin 0 high and pins 1+2 low give you address 1? would 010 be address 2 so on and so forth? also how would that relate the the address in the code? Address 0 = %00000000, address 2 = %00000010, address 3 = %00000011? This is what i've come up with on my own, and assuming this is how it works. but seems every time i act upon an assumption, things either don't work or have a catastophic meltdown.
 

BCJKiwi

Senior Member
Check out the AXE110_i2c.pdf datasheet on the Rev-Ed site.

Each device has it's own specific address(es) so the data sheet has to be checked for that device to determine what the combination of high/low on each pin gives for that specific device.

Some devices have fixed addresses. So while there is a straight forward binary switch arrangement for the address pins, the result may be different depending on the device.
e.g the DS1307 clock has a fixed address of 110100x (x is the rw bit)
The datasheet will show where and in what order in the control byte the address bits come and depending on their being tied high or low at the device that will represent 1 or 0 in those bits of the control byte

The 24LC256 has address bits at 0000aaax starting at a0 next to the x (rw bit).

Again all this is in the AXE110 pdf.
 
Top