1 2 Previous Next 16 Replies Latest reply on Apr 18, 2016 1:32 PM by DaBr_1233126

    I2C I2C_MasterWriteBuf function help


      I have 2 PSoC 4 devices that I want to talk to each other via I2C.


      One of these is connected to an NewHaven 128x32 bit LCD.  I can use the Bridge Control Panel to communicate with the LCD Slave with no problem.


      ex:  W 10 00 00 00 00 00 00 32 38 54 53 53 4f 50 00 p


      Displays    '28TSSOP'   on the top line of the LCD as I expected.


      However when I use the attached project, the following code seems to be working, but nothing appears on the LCD.




          i2cstat = I2CLCD_I2CMasterWriteBuf(0x10, (uint8 *)i2c_buf, BUFFER_SIZE, I2CLCD_I2C_MODE_COMPLETE_XFER);
          if (i2cstat == I2CLCD_I2C_MSTR_NO_ERROR )     //  I2CM_MSTR_NO_ERROR
              PWR12V_Write( ~PWR12V_Read() );


      PWR12V is connected to an LED and it toggles, which tells me there isn't an error from the write buffer command.


      Any help is appreciated.  I've been banging my head on this for 2 days now...



        1 2 Previous Next