Hi,
I am trying to configure I2C for P1.6 & P1.7
i want to send a command 0xFD followed by address 0x44 to write to the slave device.
I do have two devices and checked with the example program
P1SEL1 |= 0xC0; /* GPIO pin configuration for P1.7 & P1.6 */
/* I2C initialization */
UCB0CTLW0 = 0x0FD1; /* 7 BIT ADDRESS FOR MASTER & SLAVE, master mode I2C,smclk set, slave ack, transmitter, automatic start & stop */
UCB0BRW = 0x001F; /* CLOCK PRESCALAR VALUE SET AS 32 */
UCB0CTLW1 |= UCASTP_2; // Automatic stop generated
UCB0TBCNT = 0x0005; // number of bytes to be received
UCB0CTLW0 = 0x0FD0; /* SOFTWARE RESET DISABLED */
UCB0I2CSA = 0x0044;
/* DATA transmission configuration */
while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent
UCB0CTL1 |= UCTXSTT;
while(!(UCB0IFG & UCTXIFG0)){}
UCB0CTL1 ^= UCTXSTT;
UCB0TXBUF = 0xFD;
__delay_cycles(800);
UCB0CTL1 |= UCTXSTP;
// UCB0CTL1 ^= UCTXSTT;
UCB0TXBUF = 0xFD;
// __delay_cycles(1000);
UCB0CTL1 |= UCTXSTP;


