Now is full work! Thank You. I put one line in the I2C read rutine- while(UCB0STAT &= ~UCSCLLOW); Please check me code is it without bug. Thank You. void I2C_Read(unsigned char byteCount, unsigned char *field) { while(UCB0STAT &= ~UCSCLLOW); //Only Hold Master-for SI7020 TI_receive_field = field; if (byteCount == 1) { byteCtr = 0; __disable_interrupt(); UCB0CTL1 |= UCTXSTT; // I2C start condition while (UCB0CTL1 & UCTXSTT); // Start condition sent? UCB0CTL1 |= UCTXSTP; // I2C stop condition __enable_interrupt(); } else if (byteCount > 1) { byteCtr = (byteCount - 2); UCB0CTL1 |= UCTXSTT; // I2C start condition } else while (1); // illegal parameter }
↧