1 2 Previous Next 16 Replies Latest reply on Apr 18, 2016 1:32 PM by DaBr_1233126 Go to original post
      • 15. Re: I2C I2C_MasterWriteBuf function help

        Thanks for the image Pavloven!  Unfortunantly, all i am seeing is that garbage is being sent out.  After the Address should be a 0x01 0x02 0x10, but I am not seeing that anywhere in the stream.


        Thanks also for the suggestion for an analyzer.  I did order one today.  Just got the shipped notification a few minutes ago.  So in a week, I should have my own.  Yea!


        I think I will try rewriting this to send it byte by byte instead of using the buffer approach.  I just have to remember that buffer[0] has to be written last for the Slave to process it correctly.  (It waits for change from 0xFF to start processing...)


        Thanks for all the help!!!

        • 16. Re: I2C I2C_MasterWriteBuf function help

          OK  Incase someone else sees this thread later on, I am posting the code I ended up using to transmit the buffer in a way the EZI2C can understand.


              commStatus = I2CLCD_I2CMasterSendStart(LCD_I2C_ADDRESS, I2C_WRITE);
              commStatus += I2CLCD_I2CMasterWriteByte(0);             // Register to start write at.
              //  Send the buffer out!
              for( i = 0; i < sizeof(i2c_buf); i++ )  commStatus += I2CLCD_I2CMasterWriteByte( i2c_buf[i] );
              commStatus += I2CLCD_I2CMasterSendStop();


          I hope this is helpful to others in the future!

          1 2 Previous Next