Why the I2C clock is so slow?
When I use the USCI I2C bus to read a sensor, the I2C clock is much slower then expected, could anyone give some help on why the clock is so slow please? It also happens to the WISP 4.1DL, is it software issue or hardware issue please?
Here is my code and the waveform.
WDTCTL = WDTPW + WDTHOLD;
BCSCTL1 = CALBC1_16MHZ;
DCOCTL = CALDCO_16MHZ;
P3SEL |= 0x06; Assign I2C pins to USCI_B0
UCB0CTL1 |= UCSWRST;
UCB0CTL0 |= UCMST + UCMODE_3 + UCSYNC;
UCB0CTL1 = UCSSEL_2 + UCSWRST;
UCB0BR0 = 12; fSCL = SMCLK/12 = ~100kHz
UCB0BR1 = 0;
UCB0I2CSA = 0x53;
UCB0CTL1 &= ~UCSWRST;
while(UCB0CTL1 & UCTXSTP);
UCB0CTL1 |= UCTXSTT; Snap picture here
the upper is SDA, the lower is SCL, Data = 0xA6;
This is the USCI SPI SCLK, it is also very slow
The last modification was made by - yeagerd on Apr 26, 2012 9:28 am