EvaRegs.GPTCONA.all = 0x0859; //使能定时器1比较输出,低电平有效
EvaRegs.T1CNT = 0;
EvaRegs.T1CON.all = 0x1442; //连续增计数模式
EvaRegs.T1PR = 0xFFFF;
EvaRegs.T1CMPR = 0x3FFF;
EvaRegs.ACTR.all = 0x0666 ;
EvaRegs.DBTCONA.all = 0x0000 ;
EvaRegs.COMCONA.all = 0xA600 ;
主程序中EvaRegs.CMPR2 = 0xFC00
请问PWM的占空比和周期是多少?能具体给出计算公式吗? |