《FPM10AL 指纹识别模块例程》由会员分享,可在线阅读,更多相关《FPM10AL 指纹识别模块例程(9页珍藏版)》请在金锄头文库上搜索。
1、本文格式为Word版,下载可任意编辑FPM10AL 指纹识别模块例程 FPM10AL 指纹识别模块例程 volatile unsigned char UART1_FINGERPRINT_RECEVICE_BUFFER24; /FINGERPRINT通信协议定义 unsigned char FP_Pack_Head6 = 0xEF,0x01,0xFF,0xFF,0xFF,0xFF; /协议包头 unsigned char FP_Get_Img6 = 0x01,0x00,0x03,0x01,0x0,0x05; /获得指纹图像 unsigned char FP_Templete_Num6 =0x01
2、,0x00,0x03,0x1D,0x00,0x21 ; /获得模版总数 unsigned char FP_Search11=0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x03,0xA1,0x0,0xB2; /探寻指纹探寻范围0 - 929 unsigned char FP_Search_0_911=0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x0,0x13,0x0,0x21; /探寻0-9号指纹 unsigned char FP_Img_To_Buffer17=0x01,0x0,0x04,0x02,0x01,0x0,0x08; /将图像放入到BUFF
3、ER1 unsigned char FP_Img_To_Buffer27=0x01,0x0,0x04,0x02,0x02,0x0,0x09; /将图像放入到BUFFER2 unsigned char FP_Reg_Model6=0x01,0x0,0x03,0x05,0x0,0x09; /将BUFFER1跟BUFFER2合成特征模版 unsigned char FP_Delet_All_Model6=0x01,0x0,0x03,0x0d,0x00,0x11;/删除指纹模块里全体的模版 volatile unsigned char FP_Save_Finger9=0x01,0x00,0x06,0x
4、06,0x01,0x00,0x0B,0x00,0x19;/将BUFFER1中的特征码存放到指定的位置 volatile unsigned char FP_Delete_Model10=0x01,0x00,0x07,0x0C,0x0,0x0,0x0,0x1,0x0,0x0; /删除指定的模版 /volatile unsigned char FINGER_NUM; /*- FINGERPRINT命令字 -*/ /FINGERPRINT_获得指纹图像命令 void FINGERPRINT_Cmd_Get_Img(void) unsigned char i; for(i=0;i6;i+) /发送包头
5、UART1_Send_Byte(FP_Pack_Headi); for(i=0;i6;i+) /发送命令 0x1d UART1_Send_Byte(FP_Get_Imgi); /讲图像转换成特征码存放在Buffer1中 void FINGERPRINT_Cmd_Img_To_Buffer1(void) FPM10AL 指纹识别模块例程 unsigned char i; for(i=0;i6;i+) /发送包头 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i7;i+) /发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 UART1_Send_B
6、yte(FP_Img_To_Buffer1i); /将图像转换成特征码存放在Buffer2中 void FINGERPRINT_Cmd_Img_To_Buffer2(void) unsigned char i; for(i=0;i6;i+) /发送包头 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i7;i+) /发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 UART1_Send_Byte(FP_Img_To_Buffer2i); /将BUFFER1 跟 BUFFER2 中的特征码合并成指纹模版 void FINGERPRINT_Cmd_R
7、eg_Model(void) unsigned char i; for(i=0;i6;i+) /包头 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i6;i+) /命令合并指纹模版 UART1_Send_Byte(FP_Reg_Modeli); FPM10AL 指纹识别模块例程 /删除指纹模块里的全体指纹模版 void FINGERPRINT_Cmd_Delete_All_Model(void) unsigned char i; for(i=0;i6;i+) /包头 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i6;i+)
8、/命令合并指纹模版 UART1_Send_Byte(FP_Delet_All_Modeli); /删除指纹模块里的指定指纹模版 void FINGERPRINT_Cmd_Delete_Model(unsigned int uiID_temp) volatile unsigned int uiSum_temp = 0; unsigned char i; FP_Delete_Model4=(uiID_temp0xFF00)8; FP_Delete_Model5=(uiID_temp0x00FF); for(i=0;i8;i+) uiSum_temp = uiSum_temp + FP_Delete
9、_Modeli; /UART0_Send_Byte(uiSum_temp); FP_Delete_Model8=(uiSum_temp0xFF00)8; FP_Delete_Model9=uiSum_temp0x00FF; for(i=0;i6;i+) /包头 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i10;i+) /命令合并指纹模版 UART1_Send_Byte(FP_Delete_Modeli); FPM10AL 指纹识别模块例程 /获得指纹模板数量 void FINGERPRINT_Cmd_Get_Templete_Num(void) unsig
10、ned int i; unsigned char temp14; for(i=0;i6;i+) /包头 UART1_Send_Byte(FP_Pack_Headi); /发送命令 0x1d for(i=0;i6;i+) UART1_Send_Byte(FP_Templete_Numi); /探寻全部用户999枚 void FINGERPRINT_Cmd_Search_Finger(void) unsigned char i; for(i=0;i6;i+) /发送命令探寻指纹库 UART1_Send_Byte(FP_Pack_Headi); for(i=0;i11;i+) UART1_Send_
11、Byte(FP_Searchi); /探寻全部用户999枚 void FINGERPRINT_Cmd_Search_Finger_Admin(void) unsigned char i; for(i=0;i6;i+) /发送命令探寻指纹库 UART1_Send_Byte(FP_Pack_Headi); FPM10AL 指纹识别模块例程 for(i=0;i11;i+) UART1_Send_Byte(FP_Search_0_9i); void FINGERPRINT_Cmd_Save_Finger( unsigned char ucH_Char,unsigned char ucL_Char ) unsigned long temp = 0; 9