发布网友 发布时间:2022-04-30 06:50
共1个回答
热心网友 时间:2023-10-20 07:54
仅供参考。FPM10A光学指纹模块简要使用说明1.引脚 FPM10A使用1.0MM FPC 上接插座引出了5个引脚,在板子上有标1的位置为第一引脚。五个引脚的作用依次为: 1 为 VCC 电源的正极接 3.6V– 5.5V的电压均可。2 为 GND 电源的负极接地。3 为 TXD 串口的发送。4 为 RXD 串口的接收。5 为 NC 悬空不需要使用。2.串口 FPM10A使用标准的串口与外界通信,默认的波特率为57600,可以进行更改,请参考通信协议。可以与任何单片机,ARM,DSP等带串口的设备进行连接,请注意电平转换,连接电脑需要进行电平转换,比如MAX232电路。3.3V 5V的单片机可以直接连接。3.关于模块的检测 模块成功上电后,指纹采集窗口会闪一下,表示自检正常,如果不闪,请仔细检查电源,是否接反,接错等。4.指纹模块的温度 指纹模块使用120MHZ的DSP全速工作,工作时芯片有一些热,经过严格的测试,这是没有问题的可以放心使用,在不使用的时候可以关闭电源,以降低功耗。volatile unsigned char UART1_FINGERPRINT_RECEVICE_BUFFER[24];//FINGERPRINT通信协议定义unsigned char FP_Pack_Head[6] = {0xEF,0x01,0xFF,0xFF,0xFF,0xFF}; //协议包头unsigned char FP_Get_Img[6] = {0x01,0x00,0x03,0x01,0x0,0x05}; //获得指纹图像unsigned char FP_Templete_Num[6] ={0x01,0x00,0x03,0x1D,0x00,0x21 }; //获得模版总数unsigned char FP_Search[11]={0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x03,0xA1,0x0,0xB2}; //搜索指纹搜索范围0 - 929unsigned char FP_Search_0_9[11]={0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x0,0x13,0x0,0x21}; //搜索0-9号指纹unsigned char FP_Img_To_Buffer1[7]={0x01,0x0,0x04,0x02,0x01,0x0,0x08}; //将图像放入到BUFFER1unsigned char FP_Img_To_Buffer2[7]={0x01,0x0,0x04,0x02,0x02,0x0,0x09}; //将图像放入到BUFFER2unsigned char FP_Reg_Model[6]={0x01,0x0,0x03,0x05,0x0,0x09}; //将BUFFER1跟BUFFER2合成特征模版unsigned char FP_Delet_All_Model[6]={0x01,0x0,0x03,0x0d,0x00,0x11};//删除指纹模块里所有的模版volatile unsigned char FP_Save_Finger[9]={0x01,0x00,0x06,0x06,0x01,0x00,0x0B,0x00,0x19};//将BUFFER1中的特征码存放到指定的位置volatile unsigned char FP_Delete_Model[10]={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;i<6;i++) //发送包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<6;i++) //发送命令 0x1d UART1_Send_Byte(FP_Get_Img[i]);}//讲图像转换成特征码存放在Buffer1中void FINGERPRINT_Cmd_Img_To_Buffer1(void){ unsigned char i; for(i=0;i<6;i++) //发送包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<7;i++) //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 { UART1_Send_Byte(FP_Img_To_Buffer1[i]); }}//将图像转换成特征码存放在Buffer2中void FINGERPRINT_Cmd_Img_To_Buffer2(void){ unsigned char i; for(i=0;i<6;i++) //发送包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<7;i++) //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 { UART1_Send_Byte(FP_Img_To_Buffer2[i]); }}//将BUFFER1 跟 BUFFER2 中的特征码合并成指纹模版void FINGERPRINT_Cmd_Reg_Model(void){ unsigned char i; for(i=0;i<6;i++) //包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<6;i++) //命令合并指纹模版 { UART1_Send_Byte(FP_Reg_Model[i]); }}//删除指纹模块里的所有指纹模版void FINGERPRINT_Cmd_Delete_All_Model(void){ unsigned char i; for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<6;i++) //命令合并指纹模版 UART1_Send_Byte(FP_Delet_All_Model[i]); }//删除指纹模块里的指定指纹模版void FINGERPRINT_Cmd_Delete_Model(unsigned int uiID_temp){ volatile unsigned int uiSum_temp = 0;unsigned char i; FP_Delete_Model[4]=(uiID_temp&0xFF00)>>8;FP_Delete_Model[5]=(uiID_temp&0x00FF);for(i=0;i<8;i++) uiSum_temp = uiSum_temp + FP_Delete_Model[i];//UART0_Send_Byte(uiSum_temp);FP_Delete_Model[8]=(uiSum_temp&0xFF00)>>8;FP_Delete_Model[9]=uiSum_temp&0x00FF;for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<10;i++) //命令合并指纹模版 UART1_Send_Byte(FP_Delete_Model[i]); }//获得指纹模板数量void FINGERPRINT_Cmd_Get_Templete_Num(void){ unsigned int i; unsigned char temp[14]; for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); //发送命令 0x1d for(i=0;i<6;i++) UART1_Send_Byte(FP_Templete_Num[i]);}//搜索全部用户999枚void FINGERPRINT_Cmd_Search_Finger(void){ unsigned char i; for(i=0;i<6;i++) //发送命令搜索指纹库 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<11;i++) { UART1_Send_Byte(FP_Search[i]); }}//搜索全部用户999枚void FINGERPRINT_Cmd_Search_Finger_Admin(void){ unsigned char i; for(i=0;i<6;i++) //发送命令搜索指纹库 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<11;i++) { UART1_Send_Byte(FP_Search_0_9[i]); }}void FINGERPRINT_Cmd_Save_Finger( unsigned char ucH_Char,unsigned char ucL_Char ){ unsigned long temp = 0; unsigned char i;// SAVE_FINGER[9]={0x01,0x00,0x06,0x06,0x01,0x00,0x0B,0x00,0x19};//将BUFFER1中的特征码存放到指定的位置 FP_Save_Finger[5] = ucH_Char; FP_Save_Finger[6] = ucL_Char; for(i=0;i<7;i++) //计算校验和 temp = temp + FP_Save_Finger[i]; FP_Save_Finger[7]=(temp & 0x00FF00) >> 8; //存放校验数据 FP_Save_Finger[8]= temp & 0x0000FF; for(i=0;i<6;i++) UART1_Send_Byte(FP_Pack_Head[i]); //发送包头 for(i=0;i<9;i++) UART1_Send_Byte(FP_Save_Finger[i]); //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1}//接收反馈数据缓冲void FINGERPRINT_Recevice_Data(unsigned char ucLength){ unsigned char i; for (i=0;i<ucLength;i++) UART1_FINGERPRINT_RECEVICE_BUFFER[i] = UART1_Receive_Byte();}热心网友 时间:2023-10-20 07:54
仅供参考。FPM10A光学指纹模块简要使用说明1.引脚 FPM10A使用1.0MM FPC 上接插座引出了5个引脚,在板子上有标1的位置为第一引脚。五个引脚的作用依次为: 1 为 VCC 电源的正极接 3.6V– 5.5V的电压均可。2 为 GND 电源的负极接地。3 为 TXD 串口的发送。4 为 RXD 串口的接收。5 为 NC 悬空不需要使用。2.串口 FPM10A使用标准的串口与外界通信,默认的波特率为57600,可以进行更改,请参考通信协议。可以与任何单片机,ARM,DSP等带串口的设备进行连接,请注意电平转换,连接电脑需要进行电平转换,比如MAX232电路。3.3V 5V的单片机可以直接连接。3.关于模块的检测 模块成功上电后,指纹采集窗口会闪一下,表示自检正常,如果不闪,请仔细检查电源,是否接反,接错等。4.指纹模块的温度 指纹模块使用120MHZ的DSP全速工作,工作时芯片有一些热,经过严格的测试,这是没有问题的可以放心使用,在不使用的时候可以关闭电源,以降低功耗。volatile unsigned char UART1_FINGERPRINT_RECEVICE_BUFFER[24];//FINGERPRINT通信协议定义unsigned char FP_Pack_Head[6] = {0xEF,0x01,0xFF,0xFF,0xFF,0xFF}; //协议包头unsigned char FP_Get_Img[6] = {0x01,0x00,0x03,0x01,0x0,0x05}; //获得指纹图像unsigned char FP_Templete_Num[6] ={0x01,0x00,0x03,0x1D,0x00,0x21 }; //获得模版总数unsigned char FP_Search[11]={0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x03,0xA1,0x0,0xB2}; //搜索指纹搜索范围0 - 929unsigned char FP_Search_0_9[11]={0x01,0x0,0x08,0x04,0x01,0x0,0x0,0x0,0x13,0x0,0x21}; //搜索0-9号指纹unsigned char FP_Img_To_Buffer1[7]={0x01,0x0,0x04,0x02,0x01,0x0,0x08}; //将图像放入到BUFFER1unsigned char FP_Img_To_Buffer2[7]={0x01,0x0,0x04,0x02,0x02,0x0,0x09}; //将图像放入到BUFFER2unsigned char FP_Reg_Model[6]={0x01,0x0,0x03,0x05,0x0,0x09}; //将BUFFER1跟BUFFER2合成特征模版unsigned char FP_Delet_All_Model[6]={0x01,0x0,0x03,0x0d,0x00,0x11};//删除指纹模块里所有的模版volatile unsigned char FP_Save_Finger[9]={0x01,0x00,0x06,0x06,0x01,0x00,0x0B,0x00,0x19};//将BUFFER1中的特征码存放到指定的位置volatile unsigned char FP_Delete_Model[10]={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;i<6;i++) //发送包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<6;i++) //发送命令 0x1d UART1_Send_Byte(FP_Get_Img[i]);}//讲图像转换成特征码存放在Buffer1中void FINGERPRINT_Cmd_Img_To_Buffer1(void){ unsigned char i; for(i=0;i<6;i++) //发送包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<7;i++) //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 { UART1_Send_Byte(FP_Img_To_Buffer1[i]); }}//将图像转换成特征码存放在Buffer2中void FINGERPRINT_Cmd_Img_To_Buffer2(void){ unsigned char i; for(i=0;i<6;i++) //发送包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<7;i++) //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1 { UART1_Send_Byte(FP_Img_To_Buffer2[i]); }}//将BUFFER1 跟 BUFFER2 中的特征码合并成指纹模版void FINGERPRINT_Cmd_Reg_Model(void){ unsigned char i; for(i=0;i<6;i++) //包头 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<6;i++) //命令合并指纹模版 { UART1_Send_Byte(FP_Reg_Model[i]); }}//删除指纹模块里的所有指纹模版void FINGERPRINT_Cmd_Delete_All_Model(void){ unsigned char i; for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<6;i++) //命令合并指纹模版 UART1_Send_Byte(FP_Delet_All_Model[i]); }//删除指纹模块里的指定指纹模版void FINGERPRINT_Cmd_Delete_Model(unsigned int uiID_temp){ volatile unsigned int uiSum_temp = 0;unsigned char i; FP_Delete_Model[4]=(uiID_temp&0xFF00)>>8;FP_Delete_Model[5]=(uiID_temp&0x00FF);for(i=0;i<8;i++) uiSum_temp = uiSum_temp + FP_Delete_Model[i];//UART0_Send_Byte(uiSum_temp);FP_Delete_Model[8]=(uiSum_temp&0xFF00)>>8;FP_Delete_Model[9]=uiSum_temp&0x00FF;for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); for(i=0;i<10;i++) //命令合并指纹模版 UART1_Send_Byte(FP_Delete_Model[i]); }//获得指纹模板数量void FINGERPRINT_Cmd_Get_Templete_Num(void){ unsigned int i; unsigned char temp[14]; for(i=0;i<6;i++) //包头 UART1_Send_Byte(FP_Pack_Head[i]); //发送命令 0x1d for(i=0;i<6;i++) UART1_Send_Byte(FP_Templete_Num[i]);}//搜索全部用户999枚void FINGERPRINT_Cmd_Search_Finger(void){ unsigned char i; for(i=0;i<6;i++) //发送命令搜索指纹库 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<11;i++) { UART1_Send_Byte(FP_Search[i]); }}//搜索全部用户999枚void FINGERPRINT_Cmd_Search_Finger_Admin(void){ unsigned char i; for(i=0;i<6;i++) //发送命令搜索指纹库 { UART1_Send_Byte(FP_Pack_Head[i]); } for(i=0;i<11;i++) { UART1_Send_Byte(FP_Search_0_9[i]); }}void FINGERPRINT_Cmd_Save_Finger( unsigned char ucH_Char,unsigned char ucL_Char ){ unsigned long temp = 0; unsigned char i;// SAVE_FINGER[9]={0x01,0x00,0x06,0x06,0x01,0x00,0x0B,0x00,0x19};//将BUFFER1中的特征码存放到指定的位置 FP_Save_Finger[5] = ucH_Char; FP_Save_Finger[6] = ucL_Char; for(i=0;i<7;i++) //计算校验和 temp = temp + FP_Save_Finger[i]; FP_Save_Finger[7]=(temp & 0x00FF00) >> 8; //存放校验数据 FP_Save_Finger[8]= temp & 0x0000FF; for(i=0;i<6;i++) UART1_Send_Byte(FP_Pack_Head[i]); //发送包头 for(i=0;i<9;i++) UART1_Send_Byte(FP_Save_Finger[i]); //发送命令 将图像转换成 特征码 存放在 CHAR_buffer1}//接收反馈数据缓冲void FINGERPRINT_Recevice_Data(unsigned char ucLength){ unsigned char i; for (i=0;i<ucLength;i++) UART1_FINGERPRINT_RECEVICE_BUFFER[i] = UART1_Receive_Byte();}