stc8a8k64d4的pwm呼吸灯程序是在哪里出问题了啊,出现了这样的报错
error C211: call not to a function
error C208: 'function': too many actual parameters
感谢各位帮我看一下。
#include "STC8A8K64D4.H"
#include "intrins.h"
void delay_ms(unsigned int ms)
{
unsigned char i;
do{
i=24000000l/10000;
while(--i);
}while(--ms);
}
void pwmint()
{
P1M0=0x00;
P1M1=0x00;
P0M0=0x00;
P0M1=0x00;
PWMSET= 0x01;
P_SW2 = 0x80;
PWMCKS = 0x00;
PWMC= 3000;
PWM0T1=100
PWM0T2=1500;
PWM0CR= 0x80;
P_SW2 = 0x00;
PWMCFG= 0x0l;
}
void main()
{
unsigned int x;
pwmint();
while (1)
{
for(x=0;x<3000;x++)
{
P_SW2 = 0x80;
PWM0T1=3000-x;
PWM0T2= x;
P_SW2 = 0x00;
delay_ms(1);
}
for(x=0;x<3000;x++)
{
P_SW2 = 0x80;
PWM0T1=x;
PWM0T2= 3000-x;
P_SW2 = 0x00;
delay_ms(1);
}
}
}