This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: Interfacing to the DS1803 Digital Potentiometer via I2C

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: ADS1100

I am prototyping some hardware and trying to use the TM4C1294XL Launchpad to talk I2C to the Maxim DS1803 DigiPot.  Currently, I have a TI ADS1100 on the bus as well.  I can talk to that no problem.  I am also monitoring the SCL and SDA on an oscope.

I use the following code to read the DS1803 and it returns 0x00 0x00, as expected for power-up.  

I2CMasterSlaveAddrSet (argI2cBase, argSlaveAddr, true); //set slave address and read

I2CMasterControl (argI2cBase, I2C_MASTER_CMD_BURST_RECEIVE_START); //Read the 1st Byte
SysCtlDelay(100);
while (I2CMasterBusy(argI2cBase)){}; //Wait till end of transaction

readData[0] = (uint8_t)(I2CMasterDataGet (argI2cBase)); //Read from FIFO


I2CMasterControl (argI2cBase, I2C_MASTER_CMD_BURST_RECEIVE_FINISH); //Read the 2nd Byte
SysCtlDelay(100);
while (I2CMasterBusy(argI2cBase)){}; //Wait till end of transaction

readData[1] = (uint8_t)(I2CMasterDataGet (argI2cBase)); //Read from FIFO

printf("ADS1100 Addr: 0x%02x DATA: 0x%02x 0x%02x \n\n", argSlaveAddr, readData[0], readData[1]);

However when I try to write to the device, I see clk/data on the line and then the clock stays low and never changes..  The code sits in the first while(I2CMasterBusBusy() function.

Here is the code to write to the device.  Any ideas??

I2CMasterSlaveAddrSet(argI2cBase, argSlaveAddr, false);

I2CMasterDataPut(argI2cBase, writeData[0]);
I2CMasterControl(argI2cBase, I2C_MASTER_CMD_BURST_SEND_START);
SysCtlDelay(100);
while (I2CMasterBusBusy(argI2cBase)){};

I2CMasterDataPut(argI2cBase, writeData[1]);
I2CMasterControl(argI2cBase, I2C_MASTER_CMD_BURST_SEND_CONT);
SysCtlDelay(100);
while (I2CMasterBusBusy(argI2cBase)){};

I2CMasterDataPut(argI2cBase, argDigipotValue);
I2CMasterControl(argI2cBase, I2C_MASTER_CMD_BURST_SEND_FINISH);
SysCtlDelay(100);
while (I2CMasterBusBusy(argI2cBase)){};