AnsweredAssumed Answered

I2C LPC1788 - Reading a slave registers

Question asked by abderrezak on Jul 7, 2016
Latest reply on Jul 7, 2016 by Rolf Meeser

Hi all of you,

I'm using I2C to control a touch panel with LPC1788 used as master. I'm using LPCOpen driver to gain time.


TouchPanel Iitialization

     Pin muxing I2C


     Chip_I2C_SetClockRate // 100000

     Board_I2C_SetMod        // Pooling mode


The touch panel contain many register (page 6 - -).

First of all I want to read or write one of this register on the slave, but the broblem is when I prob SDL SCA with a serial decode I capture only the Address 0x70 in read or write. It seems that the data and the Register Slave Adress isn't send.


I'm using this command to Send Data: Chip_I2C_MasterSend(BOARD_CTP_ID, CTP_ADDR, buf, 3);

The buf contain at 0 the register Adresse then from buf[1] it contain the data I want to write.


In case of Read I use Chip_I2C_MasterRead(BOARD_CTP_ID, FT5336_I2C_SLAVE_ADDRESS, &buf[2], 1);


What is the correct way to use a Read Slave Register, and Write Value in Slave Register?


Thank you