//pms152,11位pwm不支持仿真,仿真只输出0.需要烧片测试
//说明书9.3章节有提醒说明
#include "extern.h"
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
$ pwmg0c PWMG0, PA0;
$ pwmgclk Enable,/16,SYSCLK;
PWMGCUBH =0b1111_1111; //上限
PWMGCUBL =0b0000_0000;
PWMG0DTL =0b0000_0000; //翻转值//先写
PWMG0DTH =0b1000_0000;
$ PWMG1C PWMG1,PA4;
PWMG1DTL =0b0000_0000;
PWMG1DTH =0b1000_0000;
while (1)
{
nop;
}
}
|