701【毕设课设】基于51单片机RFID射频门禁刷卡系统设计

【资源下载】下载地址如下:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

门禁系统采用STC89C52单片机作为控制核心,外围加蜂鸣器控制电路、开门指示灯电路、电控锁控制电路以及LCD液晶显示电路等。门禁系统主要由CPU、工作指示电路、振荡电路、蜂鸣器电路、门控锁电路、读卡模块、显示模块等组成。该门禁系统采用射频卡完成刷卡进门,按刷卡出门等功能。其工作原理为:当刷卡时,蜂鸣器响一下,如卡权限获得允许,显示模块显示卡号,同时继电器动作将门锁打开,指示灯点亮,延时一段时间后继电器再次动作将门锁锁闭,指示灯熄灭。当按下出门按钮时,继电器动作将门锁打开,指示灯点亮,延时一段时间后继电器再次动作将门锁锁闭,指示灯熄灭。当输入初始密码时,若输入正确,继电器动作将门锁打开,指示灯点亮,延时一段时间后继电器再次动作将门锁锁闭。此外,程序中还增加了射频卡权限判断的功能,当遇到合法卡时显示卡号,门锁打开,延时10s自动关闭,当遇到非法卡时不显示卡号门锁不开。本系统设计简单、性能优良,具有一定的实用性。 

701【毕设课设】基于51单片机RFID射频门禁刷卡系统设计_第1张图片

uchar code dis1[] = {"    欢迎使用    "};
uchar code dis2[] = {"  门禁刷卡系统  "};
uchar code dis3[] = {"                "};
uchar code dis4[] = {"    管理界面    "};
uchar code dis5[] = {"    刷卡成功    "};
uchar code dis6[] = {"    当前状态    "};
uchar code dis7[] = {"      请进!    "};
uchar code dis8[] = {"      无效卡    "};
uchar code dis9[] = {"请联系管理员开门"};
uchar code table5[]={"消费:"};
//uchar code table6[]={"余额:"};
uchar code table11[]={"充值:"};
uchar code table12[]={"扣钱:"};
uchar code table8[]={"注册成功        "};
uchar code table9[]={"撤销成功        "};
uchar code table10[]={"无效卡:        "};
unsigned char code data1[16] = {0x12,0x34,0x56,0x78,0xED,0xCB,0xA9,0x87,0x12,0x34,0x56,0x78,0x01,0xFE,0x01,0xFE};
//M1卡的某一块写为如下格式,则该块为钱包,可接收扣款和充值命令
//4字节金额(低字节在前)+4字节金额取反+4字节金额+1字节块地址+1字节块地址取反+1字节块地址+1字节块地址取反 
unsigned char code data2[4]  = {0,0,0,0x02};
unsigned char code data3[4]  = {0,0,0,0x0a};
unsigned char code  Yankey[6]  = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; //原始密码
unsigned char code  XiugaiYunKey[16]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x07,0x80,0x69,0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};	 //修改后的密码
unsigned char code  Nowkey[6]  = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE}; //xianzia 密码
unsigned char code  XiugaiNowKey[16]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x80,0x69,0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};	 //修改后的密码
unsigned char g_ucTempbuf[20];

你可能感兴趣的:(单片机设计,单片机,毕业设计,射频,刷卡)