i want a fingerprint based User Verification Program with It's header file inclusion in Embedded C. help !
thanks!
Where you planning on some own involvement in this project? You realize that a finger print program can't just be run on any random hardware?
Per,
Don't miss the punch line: he "wants".
we must do the same dear member. can the 8051 see the finger? how can the port pins p2 see the finger? what crystal will you use? and where will the webcam be connected?
www.catb.org/.../smart-questions.html
Yes..actually the project is like that i have to register a pre-standardized value @ fingerprint scanner & whenever any Person want to scan his/her own, then if the user is authenticated with pre-registered value then the system (i am using here door security concept) will go through otherwise it terminates the operation as by showing error..!
im showing you a demo program done by be..recently for that with which i found some warning n errors. i.e. I can't go with the array data saving operation that should contain by SBUF register here.
[CODE GENERATION]
#include<reg52.h>
#include<lcd.h>
#include<serial.h>
#include<string.h>
sbit SW = P3^7;
sbit motor1 = P2^0;
unsigned char D[20];
unsigned char i,value;
bit flag;
void Disp_Hex(unsigned char);
void FINGER_FUN_IDT(); // finger identification
void serial(void ) interrupt 4 { if (RI) { D[i] = SBUF; if (i>15){flag=1;} else i++; } }
void main() { bit scan_flag;
SConfig(); scan_flag=0;motor1= 0;
LCD_Init(); LCD_Cmd(0x80); Disp_Str(" WELCOME "); Delay(50);clear(); LCD_Cmd(0x80); Disp_Str(" finger print "); LCD_Cmd(0xC0); Disp_Str(" BASED PROJECT "); Delay(100); LCD_Cmd(0x80); Disp_Str(" PRESS SWITCH ");
while(1) // infinite loop { LCD_Cmd(0x80);Disp_Str(" PRESS SWITCH ");
if (SW==0) //scanning switch {
FINGER_FUN_IDT(); //command identify function EA=1;ES=1; Delay(300);
}
if (flag==1) {
flag=0;
if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x00) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON1 "); } else if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x01) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON2 "); } else if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x02) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON3 "); } else if (D[12] == 0x02) { LCD_Cmd(0xC0); Disp_Str("NO F.P ON SENSOR"); } else if (D[12] == 0x09) { LCD_Cmd(0xC0); Disp_Str("NO F.Pwere FOUND"); } EA=ES=0; }
if (scan_flag==1) {
Delay(100); LCD_Cmd(0x80); Disp_Str(" DOOOR OPEN "); motor1=0; Delay(600); LCD_Cmd(0x80); Disp_Str(" DOOR CLOSED "); motor1=1; Delay(600); motor1=0;
} } //infinite loop end
} // main loop end
void FINGER_FUN_IDT() {
Send_Char(0xEF);Send_Char(0x01); Send_Char(0xFF);Send_Char(0xFF);Send_Char(0xFF);Send_Char(0xFF); Send_Char(0x01); Send_Char(0x00);Send_Char(0x03); Send_Char(0x01); Send_Char(0x00);Send_Char(0x05);
<code is that but where is. h file program not working without. h file >
If you understand that code you would not need any header file.
If you see a need for a header file, you would then face much greater issues.
What magic hardware do you think is connected to the serial port for reading finger prints and reporting back which print it matched? As long as you don't know that part, the header file is totally irrelevant.
but programing contian errors without header file
in th project error is there is no. h file
#include<reg52.h> #include<lcd.h> #include<serial.h> #include<string.h> sbit SW = P3^7; sbit motor1 = P2^0; unsigned char D[20]; unsigned char i,value; bit flag; void Disp_Hex(unsigned char); void FINGER_FUN_IDT(); // finger identification void serial(void ) interrupt 4 { if (RI) { D[i] = SBUF; if (i>15){flag=1;} else i++; } } void main() { bit scan_flag; SConfig(); scan_flag=0;motor1= 0; LCD_Init(); LCD_Cmd(0x80); Disp_Str(" WELCOME "); Delay(50);clear(); LCD_Cmd(0x80); Disp_Str(" finger print "); LCD_Cmd(0xC0); Disp_Str(" BASED PROJECT "); Delay(100); LCD_Cmd(0x80); Disp_Str(" PRESS SWITCH "); while(1) // infinite loop { LCD_Cmd(0x80);Disp_Str(" PRESS SWITCH "); if (SW==0) //scanning switch { FINGER_FUN_IDT(); //command identify function EA=1;ES=1; Delay(300); } if (flag==1) { flag=0; if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x00) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON1 "); } else if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x01) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON2 "); } else if (D[12] == 0x00 && D[13] == 0x00 && D[14] == 0x02) { scan_flag=1; LCD_Cmd(0x80); Disp_Str(" VALID "); LCD_Cmd(0xC0); Disp_Str(" PERSON3 "); } else if (D[12] == 0x02) { LCD_Cmd(0xC0); Disp_Str("NO F.P ON SENSOR"); } else if (D[12] == 0x09) { LCD_Cmd(0xC0); Disp_Str("NO F.Pwere FOUND"); } EA=ES=0; } if (scan_flag==1) { Delay(100); LCD_Cmd(0x80); Disp_Str(" DOOOR OPEN "); motor1=0; Delay(600); LCD_Cmd(0x80); Disp_Str(" DOOR CLOSED "); motor1=1; Delay(600); motor1=0; } } //infinite loop end } // main loop end void FINGER_FUN_IDT() { Send_Char(0xEF);Send_Char(0x01); Send_Char(0xFF);Send_Char (0xFF);Send_Char(0xFF);Send_Char (0xFF); Send_Char(0x01); Send_Char(0x00);Send_Char(0x03); Send_Char(0x01); Send_Char(0x00);Send_Char(0x05); }
The program given upside is used as .h file in inclusion for Embed C. Actually that program is not working so proper with those values, the digital data of the fingerprint ridge&valley pattern which is saved in form of an array. So that, just help for such minor problems occuring their (Or by other program). Thank!
I aslo want the full program above program is contain error
Okay Guys..here I have the header files used in that program ,take a look !
[1] LCD.h File
/*LCD CONNECTION*/ #define lcd P2
sbit rs=P0^1; sbit rw=P0^2; sbit en=P0^3;
/*LCD FUNCTIONS DECLARATION*/ void lcd_init(void); void cmd(unsigned char); void disp(unsigned char); void str(unsigned char *); void delay(unsigned int);
/*LCD INITIALIZATION FUNCTION*/ void lcd_init(void) { cmd(0x38); //INITIALIZE LCD AS 2 LINE & 5X7 MATRIX (8-BIT MODE) cmd(0x0e); //DISPLAY 'ON' CURSOR BLINKING cmd(0x01); //CLEAR DISPLAY SCREEN cmd(0x06); //SHIFT CURSOR TO RIGHT cmd(0x08); //DISPLAY 'OFF' CURSOR 'OFF' } void cmd(unsigned char c) { lcd=c; rs=0; rw=0; en=1; delay(2); en=0; }
void disp(unsigned char ch) { lcd=ch; rs=1; rw=0; en=1; delay(2); en=0; }
void str(unsigned char *s) { while(*s) disp(*s++); }
void delay(unsigned int k) { unsigned int i,j; for(i=0;i<k;i++) for(j=0;j<1275;j++); }
[2] SERIAL.h Files
(Ok, here are 2 file of that, u can use any of them i' selected 2nd one.)
......./I/.......
/* FUNCTION & BIT INTIALIZATION */ void uart_init(void) { SCON=0x50; TMOD=0X20; TH1=TL1=-3; TR1=1; }
/* FOR WRITING DATA TO LCD DISPLAY */ void tx(unsigned char ch) { SBUF=ch; while(TI==0) TI=0; }
/* FOR RECEIVING ANY DATA*/ unsigned char rx(void) { while(RI==0) RI=0; return SBUF; }
main() { unsigned char c; uart_init(); while(1) { c=rx; tx(c); } } "OR"
......./II/.......
/* Transmit only */ #include<reg52.h>
/**VARIABLES DECLARATION**/ bit flag; bit r_flag = 0; int i=0; char idata buff[20],ch;
/**INTERRUPT SERVICE ROUTINE**/ void serial_intr(void) interrupt 4 { if(TI == 1) { TI = 0; flag = 1; } else if(RI==1) { ch=SBUF; if((ch!='\r') && (ch!='\n')) buff[i++]=ch; else buff[i++]='\0'; if(ch=='\n') { r_flag=1; i=0; } RI=0;
/**TRANSMISSION FUNCTION**/ void print(char *str) { while(*str) { flag = 0; SBUF = *str++; while(flag == 0); }
the blind is leading the deaf.
there is an abundance of requests for code by someone that does not even have an inkling of the issues.
AGAIN: if you can not code it yourself 'reference code' is worthless</>
Erik
Hiii.. my project is biometric system for ATM using fingerprint sensor.. i have to use R305 fingerprint sensor using 8051 microcontroller.. please give me coding of connectivity of both in c language.. thanks..