lpcware

I2C library in LPC11U68

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by rubensm on Sun Jan 04 04:36:48 MST 2015
Hi,

I'm new with LPC devices and I have some doubts about the use I2C protocol on these boards. I've read all the stuff related with I2C in the datasheet, but I don't know if there exists a encapsulated library or it must be the developer who have to handle all the I2C states using software.

I've been looking for info in the forum and searching in the Internet, but I haven't been able to clarify this issue. In the example files there is the file "i2c_11u6x.c", but it is enough to have a communication as master and as slave? Is it so simple as, for example, use the function
Chip_I2C_MasterTransfer(I2C_ID_T id, I2C_XFER_T *xfer)
to write in the slave or
Chip_I2C_MasterRead(I2C_ID_T id, uint8_t slaveAddr, uint8_t *buff, int len)
for a slave writing?

There is very little information about I2C and LPC, so I would be very greatful if someone could help me.

Thank you,
Rubén.

Outcomes