MSP430G2553的管脚 UCB0STE是对应SPI 的CS管脚吗?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
MSP430G2553的管脚 UCB0STE是对应SPI 的CS管脚吗?
是的。slave transmit enable
还有我使用的MSP430G2553,我的I2C,SPI,和串口都需要用,这样我只能用UCB0的SPI,但是UCB0的SPI又和 I2C 复用,这样
我的 I2C 是不是只能用普通IO口来模拟了?
32pin 的 G2553 有两个USCI模块啊,UCA0 做 SPI , UCB0 做 IIC 好了。
配置参考给的例程
P3SEL |= BIT3+BIT4; P2SEL |= BIT7; P3DIR |= BIT2; P3OUT &= ~BIT2; UCA0CTL1 = UCSWRST; UCA0CTL0 |= UCCKPH+UCMSB+UCMST+UCSYNC; UCA0CTL1 |= UCSSEL_2; // SMCLK UCA0BR0 = 0x02; // /2 UCA0BR1 = 0; // UCA0CTL1 &= ~UCSWRST; // UCA0IE |= UCRXIE;
UCCKPL改成了UCCKPH,因为时钟默认低电平,上升沿采样,下降沿发送。因为CS管脚连接了,配置3PIN模式,所以,就手动拉低P3DIR |= BIT2;P3OUT &= ~BIT2;