使用2812的全比较单元想产生pwm波形,另外想通过ccs能够看到产生的pwm波,请问如何设置,以及观察哪个变量? // Initalize EVA Timer1
EvaRegs.T1PR = 0x0EA6; // Timer1 period
EvaRegs.T1CMPR = 0x01F0; // Timer1 compare
EvaRegs.T1CNT = 0x0000; // Timer1 counter
EvaRegs.T1CON.all = 0x1042;
// Enable compare for PWM1-PWM6
EvaRegs.CMPR1 = 0x0330;
EvaRegs.CMPR2 = 0x0330;
EvaRegs.CMPR3 = 0x0C00;
EvaRegs.ACTRA.all = 0x0099;
EvaRegs.DBTCONA.all = 0x0178; // deadband 1*32*1/75us
EvaRegs.COMCONA.all = 0xA600;
|