欢迎来到天天文库
浏览记录
ID:14016519
大小:235.00 KB
页数:34页
时间:2018-07-25
《指纹识别程序和原理图》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#include#include#defineucharunsignedchar#defineuintunsignedint#defineDbusP0#definebuffer1ID0x01#definebuffer2ID0x02#definequeren0x88#definetuichu0x84#defineshanchu0x82sbitB0=B^0;sbitB7=B^7;sbitjidianqi=P3^6;sbitRS=P2^2;sbitRW=P2^1;sb
2、itE1=P2^0;sbitLEDK=P3^4;//控制背光sbitSCLK=P2^3;sbitIO=P2^5;sbitRST=P2^4;ucharcodeta[8]={0x00,0x51,0x09,0x10,0x05,0x02,0x11,0xbe};uchardataa[7];//秒分时日月星期年uchardz[4];//存键输入值ucharmima[7];ucharmimaID[6]={1,2,3,4,5,6};uchardataK;uchardataKey;uintPageID;uchardat
3、aquerenma;ucharsum[2];intsummaf,summas;ucharcodenian[]={"年"};ucharcodeyue[]={"月"};ucharcoderi[]={"日"};ucharcodexinqi[]={"星期"};ucharcodemao=0x3a;unsignedcharcodetext1[]={"请按指纹"};unsignedcharcodetext2[]={"请再次按指纹"};unsignedcharcodetext3[]={"指纹采集成功"};unsign
4、edcharcodetext4[]={"请按任意键继续"};unsignedcharcodetext5[]={"指纹采集失败"};unsignedcharcodetext6[]={"输入删去的指纹号"};unsignedcharcodetext7[]={"删指纹号成功"};unsignedcharcodetext8[]={"按键一:增加指纹"};unsignedcharcodetext9[]={"按键二:删去指纹"};unsignedcharcodetext10[]={"请重新按指纹"};unsign
5、edcharcodetext11[]={"清空指纹库成功"};unsignedcharcodetext12[]={"没搜索到指纹"};unsignedcharcodetext13[]={"请先按键再刷指纹"};unsignedcharcodetext14[]={"请重新操作"};unsignedcharcodetext15[]={"删去失败"};unsignedcharcodetext16[]={"接收包出错"};unsignedcharcodetext17[]={"编号为:"};unsignedch
6、arcodetext18[]={"指纹已找到请进"};unsignedcharcodetext19[]={"该指纹已存储"};unsignedcharcodetext20[]={"请输入密码"};unsignedcharcodetext21[]={"密码错误"};unsignedcharcodetext22[]={"按键三:更新密码"};//@@@unsignedcharcodetext23[]={"请再次输入密码"};unsignedcharcodetext24[]={"两次输入的密码不"};uns
7、ignedcharcodetext25[]={"一致,请重新操作"};unsignedcharcodetext26[]={"密码更新成功"};voiddelay(uinttt){uchari;while(tt--){for(i=0;i<125;i++);}}voidinitialize51(){SCON=0x50;//串口方式1//REN=1;允许接收PCON=0x80;//SMOD=1TMOD=0x20;//定时器1定时方式2TH1=0xff;//11.0592MHz模块默认波特率为57600bps
8、TL1=0xff;TR1=1;//启动定时器}unsignedcharKeycan(void)//按键扫描程序P1.0--P1.3为行线P1.4--P1.7为列线{unsignedcharrcode,ccode;P1=0xF0;//发全0行扫描码,列线输入if((P1&0xF0)!=0xF0)//若有键按下{delay(1);//延时去抖动if((P1&0xF0)!=0xF0){rcode=0xFE;//逐行扫描初值while((rcode&0x10)!
此文档下载收益归作者所有