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.

MSP430F5529: 通过MSP430的引脚P2.0发送PWM信号(3V的高低电平),从示波器观测到信号输出波形不正确,是一条横线?以下为测试连接图片和MSP430输出PWM信号代码,不知道哪里出了问题?

Part Number: MSP430F5529

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <msp430.h>
#define TASSEL_SMCLK
#define MC_UP
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
//P2.0TA0.1(
P2DIR |= BIT0;
P2SEL |= BIT0;
//SMCLKTAR
TA0CTL=TASSEL_SMCLK+MC_UP+TACLR;
//TA0CTL=TASSEL_2+MC_UP+TACLR;
TA0CCR0=10000;//
TA0CCTL2=OUTMOD_6;//
//TA0CCTL1=OUTMODE_3
TA0CCR2=1000;//
_EINT();//
while(1)
{
LPM0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX