Hello, My apologies, that line of code is not needed on the device you're using, I've overlooked that. Here is some example code for the setup I2C from the TI Resource Explorer, however it uses USCI_B0 instead of B1 like in your code: P3SEL |= 0x03; // Assign I2C pins to USCI_B0 UCB0CTL1 |= UCSWRST; // Enable SW reset UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK UCB0BR0 = 12; // fSCL = SMCLK/12 = ~100kHz UCB0BR1 = 0; UCB0I2CSA = 0x48; // Slave Address is 048h UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation UCB0IE |= UCRXIE; // Enable RX interrupt RXCompare = 0x0; You can find the rest of the code and other examples by following this link: http://dev.ti.com/tirex/explore/node?node=APvjUT.Wo5XXtuhtROdtEw__IOGqZri__LATEST Is there a reason you chose to poll instead of using interrupts? Best, Colin Adema
↧