- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
So I thought I would run the Bridge Control Panel and try reading 3 bytes but it doesn't work:
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
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content