cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

joli_601446
Contributor

Hello, I am working on my first I2C program and am running into a brick wall. Here is a snippet of my code:

int main()

{

   

     I2CM_Start();

     CyGlobalIntEnable;

     WriteCommandPacket(1);

     return 0;

}

uint32 WriteCommandPacket(uint8 cmd)

{

     uint8 buffer[3];

     buffer[0] = 1;

     buffer[1] = 1;

     buffer[2] =  0x17u;

     I2CM_MasterReadBuf(I2C_SLAVE_ADDR, buffer, PACKET_SIZE, I2CM_MODE_COMPLETE_XFER);

     while(0u == (I2CM_MasterStatus() & I2CM_MSTATE_WR_CMPLT)

     (

          // code to toggle the led on the PSOC5 Kit

      )

    

     Here is a picture of my setup:

IMG_4152.JPG

So I thought I would run the Bridge Control Panel and try reading 3 bytes but it doesn't work:

BridgeControl.jpg

I should be getting back +'s on the response.

I will upload my project which will be easier to look over.

Thank you very much,

Joe

0 Likes
1 Solution
LiDo_2439176
Contributor II

You have to select Kitprog.

View solution in original post

0 Likes
10 Replies