MCB4300 board's EEPROM slave i2c address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCB4300 board's EEPROM slave i2c address

1,144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by grtester on Mon Nov 24 18:05:16 MST 2014
    I'm working on the Keil MCB4300 (LPC4357) board which has an EEPROM: a Microchip 24LC128. The data sheet states its I2C slave address should be 0xA2. (1010 for control code, and bit A0 is hardwired to high, according to board schematic). The LPCOpen project periph_i2c's i2c.c defines the the slave address as 0x5A instead.

i2c.c:

line 69: #define I2C_SLAVE_EEPROM_ADDR       0x5A

    Is the project wrong, or did I interpret the datasheet incorrectly? The project hangs for me, so I'm wondering if this is the problem.
Labels (1)
0 Kudos
4 Replies

1,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by grtester on Fri Nov 28 16:25:20 MST 2014
Thanks so much for your response!
0 Kudos

1,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Nov 26 10:58:22 MST 2014

Quote: grtester
Perhaps I am misinterpreting the datasheet?



No 

If you look in your I2C routines, you should find there a shifting of the 7-bit address to generate the first byte.

Something like:

/* Write Address and RW bit to data register */
Chip_I2CM_WriteByte(pI2C, (xfer->slaveAddr [color=#f00]<< 1[/color]) | (xfer->txSz == 0));


Anyway, if your address is correct, I2C should work.

Could be a good idea to check EEPROM wiring of your board. Perhaps the schematic is wrong....


0 Kudos

1,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by grtester on Wed Nov 26 10:35:56 MST 2014
Thanks for the response. I am still confused about the last digit.

The schematic shows that 24LC128's inputs A0 is hardwired to high, and the A1 and A2 are low. So, I believe we need to access A0 for the I2C slave address.

The 24LC128 datasheet says to address A0, we need to send:
2_10100010 (0xA2) in 8-bit addressing
or as R2D2 suggested,
2_01010001 (0x51) in 7-bit addressing

However, i2c.c defines

line 69: #define I2C_SLAVE_EEPROM_ADDR 0x5A

Does anyone know why its 0x5A? Perhaps I am misinterpreting the datasheet?
0 Kudos

1,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Nov 24 18:24:21 MST 2014
Looks like the usual 7bit / 8bit address  confusion  :)

See: http://www.totalphase.com/support/articles/200349176-7-bit-8-bit-and-10-bit-I2C-Slave-Addressing

0 Kudos