![](https://csdnimg.cn/release/download_crawler_static/87197310/bg6.jpg)
{
Speak=0;delay_10ms(20);Speak=1;//蜂鸣器提示
Table[0]=UID[0]/100+0x30; //卡号显示
Table[1]=UID[0]/10%10+0x30; //卡号显示
Table[2]=UID[0]%10+0x30; //卡号显示
LCD1602_Disp_ZF(0x80+0x40,"Num: ",16); //卡号显示
LCD1602_Disp_ZF(0x84+0x40,Table,3); //卡号显示
Count = UID[0]; //判断卡是不是有效
if((Count==Count1)||(Count==Count2)||(Count==Count3)||(Count==Count4)||(
Count==Count5))
{
LCD1602_Disp_ZF(0x88+0x40,"Wele",7); //卡有效
GREEN = 0;Relay=0;delay_10ms(200);Relay=1;GREEN = 1; //绿灯亮,翻开继电器
C_flag=1;
}
else
{
LCD1602_Disp_ZF(0x88+0x40,"Error ",7);//卡无效
RED = 0;delay_10ms(500);RED = 1; //红灯亮
C_flag=2;
}