写的m16c62p用于三相马达控制的程序,输出端口就是没波形不知道什么原因,麻烦大家看一下,下面是定时器初始化程序
#include"PWM_int.h"
void timerA1_int();
void timerA2_int();
void timerA4_int();
void timerB2_int();
void PWM_int()
{
prc1=1;
invc0=0x1c;
invc1=0x32;
prc1=0;
trgsr=0x45;
timerA1_int();
timerA2_int();
timerA4_int();
timerB2_int();
}
void timerA1_int()
{
int count1=5;
ta1mr=0x52; //定时器A1为8分频,6mhz
ta1=0x0096; //占空比为50%
ta11=0x004b;
while(count1