Other Parts Discussed in Thread: LDC1614, LDC1614EVM
Tool/software: TI C/C++ Compiler
Hello Ti
Hope that someone can help me to understand the I2C Protocol
I have been working on generating a clock on SCK pin but oscilloscope is always reading Low without any generated clock
I have been working on this code
// Configure GPIO of I2C
P1OUT &= ~BIT0; // Clear P1.0 output latch
P1DIR |= BIT0; // For LED
P1SEL0 |= BIT2 | BIT3; // I2C pins
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
// Configure USCI_B0 for I2C mode
UCB0CTLW0 |= UCSWRST; // Software reset enabled
UCB0CTLW0 |= UCMODE_3 | UCMST | UCSYNC; // I2C mode, Master mode, sync
UCB1CTLW0 |= UCTR + UCTXSTT;
UCB0CTLW1 |= UCASTP_2; // Automatic stop generated
// after UCB0TBCNT is reached
UCB0BRW = 0x0008; // baudrate = SMCLK / 8
UCB0TBCNT = 0x0005; // number of bytes to be received
UCB0I2CSA = 0x2A; // Slave address
UCB0CTL1 &= ~UCSWRST;
so if there is someone who can help me to understand how i can generate the clock from this code that is initializing the I2C
Thanks in Advance
Best Regards,
Sherif Ismail