CC2530 Timer3 P1_3做为PWM输出,可以修改输出频率,无法修改占空比?
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.
问题解决,自问自答!
PERCFG &= ~0x20; //优先级设置
P1SEL |= 0X18; //使用第二功能
P1DIR |= 0X18; //p1.3输出
//P1INP = 0x00 ; //&=~0X00; //设置上拉,功能
T3CNT = 0X06; //initial value
T3CTL |= 0x04; //clear timer3
T3CTL |= 0XE0; //module mode 128分频
P2SEL |= 0X20;
T3CCTL0 = 0x2C;//0x1C; //通道0 (P1.3)
T3CC0 = 0x60; //compare value
T3CCTL1 = 0x2C;//0x1C; //通道1(P1.4)
T3CC1 = 0x80;
修改:T3CC0 = 0x60; //compare value改变占空比。