Hi,
I'm trying to get i2c set up, but it is not working (I don't get any data over the SDA or SCL lines).
I am using CCS6, halcogen 4.1, tms570LS1227 and interfacing with a microchip MCP23008 I/o expander.
In Halcogen I have enabled the i2c driver and selected i2c on the pinmux tab. On the i2c global tab I have it set for 7 bit addr mode, enable master mode, transmitter, 8 bit count, 8 data count, and enable free data format (I have tried without free data format as well).
To read from a register on the slave device, I need to send 8 bits of the device opcode (0x4D) followed by the register address (0x00).
I'm sure I'm just missing something stupid, but I can't see it. Any help is appreciated.
i2cInit(); i2cSetStart(i2cREG1); i2cSendByte(i2cREG1, 0x4D); i2cSendByte(i2cREG1, 0x00); while(i2cIsRxReady(i2cREG1)){}; data = i2cReceiveByte(i2cREG1); i2cSetStop(i2cREG1);