Other Parts Discussed in Thread: TM4C123GH6PM
Hello,
I have a Tiva C Series Launchpad with TM4C123GH6PM microcontroller and I use CCS v6.0
I want to program a MCP4451-103 DPOT (datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/MCP4451.pdf).
I want to write in DPOT a single resistor value and stop.
At page 59 of MCP4451 datasheet there is a "I2C write sequence" figure.
RESET pin is always settled in high state, "1".
In my code with the string:
#define SLAVE_ADDRESS 0x2E // (with A1="1", and A0="0")
I2CSlaveEnable(I2C0_BASE);
I2CSlaveInit(I2C0_BASE, SLAVE_ADDRESS);
I2CMasterSlaveAddrSet(I2C0_BASE, SLAVE_ADDRESS, false);
IntMasterEnable();
ui32DataTx = 0x10;
I2CMasterDataPut(I2C0_BASE, ui32DataTx);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_SINGLE_SEND);
I think that, with this code, I don't specify the "write command" which is indicate in the "I2C write sequence" figure at page 59 of MCP4451 datasheet.
With this code I measure always the mid value (5 kohm) between the A or B terminal and the wiper terminal.
The data doesn't arrives in the slave devices.
I hope that you can help me.
Thanks,
Ivan