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.

MSP430F169硬件I2C问题

Other Parts Discussed in Thread: ADS1115

编译环境IARV5.3,与ADS1115通信

1.写入模式和读取模式寄存器的配置正确吗?

void WriteMod()
{
    U0CTL |= MST;                            //主模式
    I2CTCTL |= I2CTRX;                  //发送模式
    I2CIFG &= ~TXRDYIFG;            //清楚发送中断标志位
    I2CIE = TXRDYIE;                      //发送中断允许
}
void ReadMod()
{
    I2CTCTL &= ~I2CTRX;              //接受模式
    U0CTL |= MST;                           //主模式
    I2CIFG &= ~RXRDYIFG;           //清除接收中断标志位
    I2CIE &= ~TXRDYIE;                 //关闭发送中断
    I2CIE |= RXRDYIE;                    //接收终端允许
}

2.当连续写入多个数据中间没有停止位时如何判断从机的ACK信号?什么时候可以继续写入下一字节?

3.当处于接受模式时,如何给从机ACK应答信号?一个十六位寄存器的值如何读出?