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.
I am struggling to get an I2C interface to work on an MSP430F5529LP. I have the ports configured correctly as I get the beginning of a transmission. I am trying to communicate with an LTC4151 device.
On my oscilloscope,
I see the start occur correctly.
I see the correct address.
I see the RD/WR pin LOW indicating a Write.
I get an ACK from the slave device.
This is where things go wrong. Below is the code I have. It is a function call that I pass in the Device Address and the Register inside the device to read.
void I2C_UCB1_CUR_MON_read(char cur_mon_addr, char cur_mon_reg){
char temp_addr;
UCB1I2CSA = cur_mon_addr; // Set Slave Address
UCB1CTL1 &= ~UCSWRST; // Clear SW reset, resume operation
I2C_UCB1_Char = cur_mon_reg; // Load Register that is to be accessed
UCB1IFG &= ~UCTXIFG; // Clear USCI_B1 TX int flag
UCB1IE |= UCTXIE; // Enable TX interrupt
UCB1CTL1 |= UCTR + UCTXSTT; // I2C TX, start condition
//------------------------------------------------------------------------------
}
No mater what I try, I am not seeing the Register value transmitted out the I2C bus. I have tried to both use the TX interrupt and to do the following
UCB1TXBUF = cur_mon_reg;
any help is appreciated.
**Attention** This is a public forum