Hi,
I am using i2c based temperature IC in my project. After initializing i2c , the device continuously showing i2c busy just after initialization in debug mode.
This is my initialization function.
void i2c_init()
{
P6SEL0 |= (BIT4| BIT5); //selecting sda/scl pin
P6SEL1 &= ~(BIT4| BIT5);
P6DIR &= ~(I2C_SCL); //as input
P6DIR |= I2C_SDA; //as output
UCB3CTL1 |= UCSWRST;
UCB3CTLW0 |= UCMODE_3 | UCMST | UCSYNC | UCSSEL__ACLK;
UCB3BRW = 0x0008;
UCB3CTL1 &= ~UCSWRST;
UCB3IE |= UCTXIE0 | UCRXIE0 | UCSTTIE | UCNACKIE;
}
Am i doing something wrong here? Please help me in this.