- UID
- 349289
- 性别
- 男
|
我用的是56f8367.写了个初始化的小程序,连接没错,在灯上为什么没有显示?
请大侠指教
void main()
{
initpwm();
while(1)
{
NOP;
}
}
void initpwm()
{ PWMA_PMICCR =7;//内部修正控制
PWMA_PMOUT =0;
PWMA_PMCCR =0;
PWMA_PMCFG =0X100E;//边对齐,独立通道,正逻辑
PWMA_PWMCM =6000;
PWMA_PWMVAL0 =6000;
PWMA_PWMVAL1 =3000;
PWMA_PWMVAL2 =3000;
PWMA_PWMVAL3 =3000;
PWMA_PWMVAL4 =3000;
PWMA_PWMVAL5 =3000;
PWMA_PMOUT =0X803F;
PWMA_PMCTL =0xe3;//8分频,中断允许,置位LDOK,PWMEN
}
|
|