我使用P3.0和P3.1作為pwm的輸出引腳,可是不管怎么配置,io就是沒有輸出,如果直接寫io的話就有反應,請問是什么原因?
????????P3_MOD_OC &= ~(bPWM1_ | bPWM2_); //設置PWM引腳為推挽輸出
P3_DIR_PU |= bPWM1_ | bPWM2_;
PIN_FUNC |= bPWM1_PIN_X; //PWM1使用P3.0
PIN_FUNC |= bPWM2_PIN_X; //PWM2使用P3.1
//PWM
PWM_CK_SE= 24; //PWM分頻系數(shù)
PWM_DATA1 = 0x80;
PWM_DATA2 = 0x80;
PWM_CTRL |= bPWM1_OUT_EN | bPWM2_OUT_EN | bPWM_CLR_ALL;