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重复开始问题,一直弄不懂到底怎么发送重新开始信号



//---------------发送两个字节所要读出数据的地址----------------//
  I2CNDAT = 0x03;
  U0CTL |= MST;                             // Master mode
  while (I2CBUSY & I2CDCTL);
  I2CTCTL |= I2CTRX + I2CSTT ;
  while ((I2CIFG & TXRDYIFG) == 0);         // Wait for transmitter to be ready
  I2CDRB = 0x00;                            // Load  I2CDRB
  while ((I2CIFG & TXRDYIFG) == 0);         // Wait for transmitter to be ready                                // Increment TX data
  I2CDRB = 0x04;                            // Load  I2CDRB
  while ((I2CTCTL & I2CSTP) == 0x02);       // Wait for Stop Condition
 //-------------------------------------------------------------//
  //-----------------------准备接收一字节-----------------------//
  //while ((I2CIFG & ARDYIFG) == 0);
  I2CNDAT = 0x01;
  U0CTL |= MST;                             // Master___
  while (I2CBB & I2CDCTL);
  while (I2CBUSY & I2CDCTL);                // I2C ready? 在空闲状态:0,空闲;1:忙
  I2CTCTL = I2CSTT + I2CSTP;                // Receive, ST, SP (clears MST)

这个是读24C64某一地址的代码,但是一直失败,帮我看看怎么回事,在发完从地址后怎么重新开始,我是想发完从地址后不发送停止位,直接发送下一个开始信号