TEXT1.C(4): error C132: 'interrup': not in formal parameter list
#include<reg51.h>sbitd1=P1^0;sbitd2=P1^7;voidtimer0(void)interrup1using1{d1=!d1;TH0=(...
#include<reg51.h>
sbit d1=P1^0;
sbit d2=P1^7;
void timer0(void)interrup 1 using 1
{
d1=!d1;
TH 0=(65536-50000)/256;
TL 0=(65536-50000)%256;
}
void timer1(void) interrup 2 using 2
{
d2=!d2;
}
void main(void)
{
TMOD=0x61;
TH0 =(65536-50000)/256;
TL0 =(65536-50000)%256;
TH1 =256-5;
TL1 =256-5;
IP=0x08;
EA=1;
ET0 =1;
ET1 =1;
TR0 =1;
TR1 =1;
for(;;) {}
}
Build target 'Target 1'
compiling Text1.C...
TEXT1.C(4): error C132: 'interrup': not in formal parameter list
TEXT1.C(4): error C141: syntax error near '1'
TEXT1.C(6): error C244: 'd1': can't initialize, bad type or class
TEXT1.C(6): error C132: 'd1': not in formal parameter list
TEXT1.C(7): error C132: 'TH': not in formal parameter list
TEXT1.C(7): error C141: syntax error near '0'
TEXT1.C(8): error C132: 'TL': not in formal parameter list
TEXT1.C(10): error C132: 'timer1': not in formal parameter list
TEXT1.C(10): error C141: syntax error near 'interrup'
TEXT1.C(10): error C132: 'interrup': not in formal parameter list
TEXT1.C(12): error C244: 'd2': can't initialize, bad type or class
TEXT1.C(12): error C132: 'd2': not in formal parameter list
TEXT1.C(13): error C141: syntax error near '}'
Target not created 展开
sbit d1=P1^0;
sbit d2=P1^7;
void timer0(void)interrup 1 using 1
{
d1=!d1;
TH 0=(65536-50000)/256;
TL 0=(65536-50000)%256;
}
void timer1(void) interrup 2 using 2
{
d2=!d2;
}
void main(void)
{
TMOD=0x61;
TH0 =(65536-50000)/256;
TL0 =(65536-50000)%256;
TH1 =256-5;
TL1 =256-5;
IP=0x08;
EA=1;
ET0 =1;
ET1 =1;
TR0 =1;
TR1 =1;
for(;;) {}
}
Build target 'Target 1'
compiling Text1.C...
TEXT1.C(4): error C132: 'interrup': not in formal parameter list
TEXT1.C(4): error C141: syntax error near '1'
TEXT1.C(6): error C244: 'd1': can't initialize, bad type or class
TEXT1.C(6): error C132: 'd1': not in formal parameter list
TEXT1.C(7): error C132: 'TH': not in formal parameter list
TEXT1.C(7): error C141: syntax error near '0'
TEXT1.C(8): error C132: 'TL': not in formal parameter list
TEXT1.C(10): error C132: 'timer1': not in formal parameter list
TEXT1.C(10): error C141: syntax error near 'interrup'
TEXT1.C(10): error C132: 'interrup': not in formal parameter list
TEXT1.C(12): error C244: 'd2': can't initialize, bad type or class
TEXT1.C(12): error C132: 'd2': not in formal parameter list
TEXT1.C(13): error C141: syntax error near '}'
Target not created 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询