User Tools

Site Tools


i2c_waveform

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

i2c_waveform [2018/07/11 08:25] (current)
Line 1: Line 1:
 + Why the I2C clock is so slow?\\ \\  Hi all,​\\ ​ 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;​\\ \\  BCSCTL2 |=0x52;​\\ ​ 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 |=UCTR;\\ \\  UCB0CTL1 |= UCTXSTT; //Snap picture here//\\ \\  the upper is SDA, the lower is SCL, Data = 0xA6;\\ {{::​16mhz.jpg?​nolink&​800}}\\ \\  This is the USCI SPI SCLK, it is also very slow\\ {{::​15102012348.jpg?​nolink&​800}}\\ \\ 
 +---- 
 +\\  The last modification was made by - [[http://​www.wikispaces.com/​user/​view/​yeagerd|{{http://​www.wikispaces.com/​user/​pic/​yeagerd-lg.jpg?​16x16|yeagerd}}]] [[http://​www.wikispaces.com/​user/​view/​yeagerd|yeagerd]] on Apr 26, 2012 9:28 am
i2c_waveform.txt · Last modified: 2018/07/11 08:25 (external edit)