这是我从网上抄写下来的一个解码pt2262的程序,但编译时老是提示
main.c(82): error C233: 'RemExit': undefined label,这是因为什么,怎么解决,
衷心的感谢!!!
#include "reg51.h"
#include "intrins.h" //µ÷ÓÃ_nop_()£¬ÑÓʱÓÃ
unsigned char Receive[3]; //½âÂ뻺³åÇø
bit flag = 0; //½âÂëÍê³É±ê־λ
sbit RemPin=P3^2 ; //ÖжÏÒý½Å ±àÂëÐźÅÊäÈë½Å
void IntInitial(void) //ÖжÏϵͳ³õʼ»¯
{
IT0 = 1; //ÍⲿÖжÏ0ϽµÑØÓÐЧ
EX0 = 1; //¿ªÆôÍⲿÖжÏ0
EA = 1; //¿ªÆôÈ«¾ÖÖжÏ
}
void INT0_ISR(void)interrupt 0 using 1 //ÍⲿÖжÏ0·þÎñº¯Êý£¬ÊµÏÖ¶Ô2262µÄ½âÂë
{
unsigned char i = 0;
unsigned char j = 0;
unsigned int temp = 0x0000;
EA = 0;
TH0 = 0;
TL0 = 0;
while(!RemPin) //µÈ´ý¸ßµçƽµÄµ½À´£¬¼ì²âͬ²½Í·
TR0 = 1; //Æô¶¯¶¨Ê±Æ÷0£¬¿ªÊ¼²âÁ¿¸ßµçƽµÄ¿í¶È
while(RemPin)
{
if(TF0 == 1) //¶¨Ê±Æ÷Òç³öÖжϱê־λ
{
goto RemExit; //¶¨Ê±Æ÷³¬Ê±Òç³öÔòÍ˳ö
}
}
TR0 = 0; //¹Ø±Õ¶¨Ê±Æ÷0
temp = TH0;
temp = temp<<8;
temp = temp+TL0; //È¡µÃ¸ßµçƽµÄ¿í¶È
if((0x36B0<temp)&&(temp<0x4100)) //¼ì²âͬ²½Í·
{
for(j = 0;j<3;j++) //Ñ»·Èý´Î
{
for(i=0;i<8;i++)
{
TH0 = 0;
TL0 = 0;
while(!RemPin) //µÈ´ý¸ßµçƽµÄµ½À´
TR0 = 1; //¿ªÆô¶¨Ê±Æ÷0£¬²âÁ¿¸ßµçƽµÄ¿í¶È
while(RemPin)
{
if(TF0 == 1)
{
goto RemExit; //¶¨Ê±Òç³öÔòÍ˳ö
}
}
TR0 = 0;
temp = TH0;
temp = temp<<8;
temp = temp+TL0; //È¡µÃ¸ßµçƽµÄ¿í¶È
if((1000<temp)&&(temp<1800)) //ÅжϵÄÕÂö³å£º1±íʾ
{
Receive[j] = Receive[j] <<1;
Receive[j] = Receive[j] + 0x01;
}
else if (( 300<temp)&&(temp<700)) //ÅжϵĿíÂö³å£º0±íʾ
{
Receive[j] = Receive[j]<<1;
}
else
return;
}
}
flag = 1; //±íʾÒѽâÂëÍê±Ï
return;
}
else
{
goto RemExit;
}
TR0 = 0;
EA = 1;
TF0 = 0;
RemPin = 1;
return;
}
}
|