指纹识别模块程序及原理图

上传人:飞*** 文档编号:53515076 上传时间:2018-09-01 格式:PDF 页数:34 大小:682.65KB
返回 下载 相关 举报
指纹识别模块程序及原理图_第1页
第1页 / 共34页
指纹识别模块程序及原理图_第2页
第2页 / 共34页
指纹识别模块程序及原理图_第3页
第3页 / 共34页
指纹识别模块程序及原理图_第4页
第4页 / 共34页
指纹识别模块程序及原理图_第5页
第5页 / 共34页
点击查看更多>>
资源描述

《指纹识别模块程序及原理图》由会员分享,可在线阅读,更多相关《指纹识别模块程序及原理图(34页珍藏版)》请在金锄头文库上搜索。

1、程序:#include #include #define uchar unsigned char #define uint unsigned int #define Dbus P0 #define buffer1ID 0x01 #define buffer2ID 0x02 #define queren 0x88 #define tuichu 0x84 #define shanchu 0x82 sbit B0=B0; sbit B7=B7; sbit jidianqi=P36; sbit RS=P22; sbit RW=P21; sbit E1=P20; sbit LEDK=P34; /控制背光

2、sbit SCLK=P23; sbit IO=P25; sbit RST=P24; uchar code ta8=0x00,0x51,0x09,0x10,0x05,0x02,0x11,0xbe; uchar data a7; / 秒分时日月星期年uchar dz4; /存键输入值uchar mima7; uchar mimaID6=1,2,3,4,5,6; uchar data K; uchar data Key; uint PageID; uchar data querenma; uchar sum2; int summaf,summas; uchar code nian=“ 年“; uch

3、ar code yue=“ 月“; uchar code ri=“ 日“; uchar code xinqi=“ 星期 “; uchar code mao=0x3a; unsigned char code text1=“ 请按指纹“; unsigned char code text2=“ 请再次按指纹“; unsigned char code text3=“ 指纹采集成功“; unsigned char code text4=“ 请按任意键继续“; unsigned char code text5=“ 指纹采集失败“; unsigned char code text6=“ 输入删去的指纹号“;

4、 unsigned char code text7=“ 删指纹号成功“; unsigned char code text8=“ 按键一:增加指纹“; unsigned char code text9=“ 按键二:删去指纹“; unsigned char code text10=“ 请重新按指纹“; unsigned char code text11=“ 清空指纹库成功“; unsigned char code text12=“ 没搜索到指纹“; unsigned char code text13=“ 请先按键再刷指纹“; unsigned char code text14=“ 请重新操作“;

5、unsigned char code text15=“ 删去失败“; unsigned char code text16=“ 接收包出错“; unsigned char code text17=“ 编号为:“; unsigned char code text18=“ 指纹已找到请进 “; unsigned char code text19=“ 该指纹已存储“; unsigned char code text20=“ 请输入密码“; unsigned char code text21=“ 密码错误“; unsigned char code text22=“ 按键三:更新密码“; / unsign

6、ed char code text23=“ 请再次输入密码“; unsigned char code text24=“ 两次输入的密码不“; unsigned char code text25=“ 一致,请重新操作“; unsigned char code text26=“ 密码更新成功“; 另外:void delay(uint tt) uchar i; while(tt-) for(i=0;i4; n4=a6 WriteCommand(0x90); /指定第二行显示位置WriteData(0x32);WriteData(0x30);WriteData(0x30+n3);WriteData(0

7、x30+n4); for(i=0;i4; y2=a4 WriteData(0x30+y1);WriteData(0x30+y2); for(i=0;i4; r2=a3 WriteData(0x30+r1);WriteData(0x30+r2); for(i=0;i4;s2=a2 f1=a14;f2=a1 m1=a04;m2=a0 WriteCommand(0x98); /指定第四行显示位置WriteData(0x30+s1);WriteData(0x30+s2);WriteData(mao);WriteData(0x30+f1);WriteData(0x30+f2); WriteData(ma

8、o);WriteData(0x30+m1);WriteData(0x30+m2); /*/12864 /*/ds1302控制uchar r1302() /读数据 ds1302 uchar i; for(i=0;i=1; B7 = IO; SCLK=1; SCLK=0; return B; void w1302(uchar co) / 写 ds1302 单字节 uchar i; B = co; for(i=0;i=1; void w(uchar a, uchar d) /寻址,写数 RST = 0; SCLK = 0; RST = 1; w1302(a); w1302(d); SCLK = 1;

9、 RST = 0; uchar r(uchar a) /寻址,读数 uchar r; RST = 0; SCLK = 0; RST = 1; w1302(a); r=r1302(); SCLK = 1; RST = 0; return r; void wclo(uchar *p) /写多字节 ds1302 uchar i; w(0x8e,0x00); /写允许RST=0; SCLK=0; RST=1; w1302(0xbe); /写多字节命令for(i=0;i8; SBUF=sum1; while(TI=0) TI=0; SBUF=sum0; while(TI=0) TI=0; for(i=0

10、;i=1011 querenma=0x18? uchar i,ID1,ID2; SBUF=0xef; while(TI=0); TI=0; SBUF=0X01; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0X01; while(TI=0); TI=0; SBUF=0X00; while(TI=0); TI=0; SBUF=0X06; while(TI=

11、0); TI=0; SBUF=0X06; while(TI=0); TI=0; SBUF=0X01; while(TI=0); TI=0; ID1=pageID;ID2=pageID8; SBUF=ID2; while(TI=0); TI=0; SBUF=ID1; while(TI=0); TI=0; summaf=0x0e+ID1+ID2; sum0=summaf; sum1=summaf8; SBUF=sum1; while(TI=0); TI=0; SBUF=sum0; while(TI=0); TI=0; for(i=0;i255 都会使程序卡 uchar i,ID1,ID2; SBU

12、F=0xef; while(TI=0); TI=0; SBUF=0X01; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0XFF; while(TI=0); TI=0; SBUF=0X01; while(TI=0); TI=0; SBUF=0X00; while(TI=0); TI=0; SBUF=0X08; while(TI=0); TI=0; SBUF=0X1b; while(TI=0); TI=0; SBU

13、F=bufferID; while(TI=0); TI=0; SBUF=0X00; while(TI=0); TI=0; SBUF=0; while(TI=0); TI=0; SBUF=0X00; while(TI=0); TI=0; SBUF=180; while(TI=0); TI=0; summaf=9+0x1b+bufferID+180; sum0=summaf; sum1=summaf8; SBUF=sum1; while(TI=0); TI=0; SBUF=sum0; while(TI=0); TI=0; for(i=0;i8; SBUF=ID2; while(TI=0); TI=

14、0; SBUF=ID1; while(TI=0); TI=0; SBUF=0X00; while(TI=0); TI=0; SBUF=1; while(TI=0); TI=0; summaf=0x15+ID1+ID2; sum0=summaf; sum1=summaf8; SBUF=sum1; while(TI=0); TI=0; SBUF=sum0; while(TI=0); TI=0; for(i=0;i=0) if(j=1) PageID=dz1+dz0*10; if(j=0) PageID=dz0; SFG_deletchar(PageID); if(querenma=0) Clrram(); WriteCommand(0x90); /指定第二行显示位置显示删除成功for(i=0;i=0)WriteData(0x30+(0x0f while(1) Key=Keycan(); if(Key=0x18) /指纹刷机 Clrram(); shuazhiwen(); Clrram(); if(Key=0x81) /管理员操作 Clrram(); guanliyuan(); Clrram(); rclo(a); playtime(); delay(100); jidianqi=1;

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 其它文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号