I2C Init with LPC1857

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Steeef on Tue Apr 29 05:02:39 MST 2014
Hi there,
I use the eval board from Hitex with the LPC 1857 and I try to communicate via I2C with a temperature sensor. The name of this sensor is SE97B from NXP and he´s on the eval board.

I've used some I2C libraries from LPCOpen and this is the result:

void Board_I2C(void)
Chip_I2C_SetClockRate(I2C0, SPEED_400KHZ);
Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandlerPolling);

void Temp_Sensor_Init(void)
SE97B.slaveAddr = (SLAVE_ADDRESS << 1) ;   // SLAVE_ADDRESS = 0x30 --> data sheet, A2 A1 and A0 are GND
SE97B.txBuff = I2C_Tx_Buf;
SE97B.rxBuff = I2C_Rx_Buf;
SE97B.txSz = 3;
SE97B.rxSz = 0;

I2C_Tx_Buf[0] = 0x00;                                             // Low Byte
I2C_Tx_Buf[1] = 0x00;// High Byte
        I2C_Tx_Buf[2] = 0x01;// CONFIG Register Addr

Chip_I2C_MasterTransfer(I2C0, &SE97B);

The The Chip_I2C_MasterTransfer - function works according to this scheme:

Unfortunately, I see on the oscilloscope no clock and no data. Have anyone some experience and can help me to find the right functions?