Microcontroller › 8051 › help for finger print based attendance monitoring system
- This topic has 0 replies, 1 voice, and was last updated 12 years, 1 month ago by
BHARATH.S.HEGDE.
-
AuthorPosts
-
January 7, 2013 at 9:58 am #2052
BHARATH.S.HEGDE
ParticipantHai, I am doing finger print based attendance monitoring system and I am using R303A module. The lcd, RTC and EEPROM parts in the project are working fine but the problem that I am facing is the module is not respondig to the commands that I am sending to it.
Here is my main function…… if you want full code to find solution post the contact details to which i have to send tthe code….. please help me…………………
#include<reg51.h>
#include”lcd.h”
#include”I2c.h”
#include”enroll.h”
#include”search.h”
#include”delay.h”sbit enroll=P0^0;
sbit search=P0^1;unsigned char clock[7]={0x00,0x00,0x09,0x00,0x02,0x12,0x13};
unsigned char add_location[7]={0x00,0x01,0x02,0x03,0x04,0x05,0x06};void main() //start of main
{unsigned int i,j,add=0;
unsigned char verify_password[16]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x07,0x13,0xFF,0xFF,0xFF,0xFF,0x04,0x17};
//unsigned char set_baudrate[14]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x05,0x0E,0x04,0x06,0x00,0x1E};
//unsigned char set_security[14]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x05,0x0E,0x05,0x01,0x00,0x1A};
//unsigned char set_package_length[14]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x05,0x0E,0x06,0x00,0x00,0x1A};
//unsigned char port_control[13]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x04,0x17,0x01,0x00,0x1D};unsigned char Rxsbuf, confirm_code, store, put_attend;
enroll=1; //making the enroll Pin input
search=1; // making the search Pin inputTMOD=0x20;
TH1=0xFF;
SCON=0x50;
PCON=0x80;
TR1=1;
TI=0;lcd_init();//initialize lcd
lcd_display(“LCD INITIALISED”);
while(add<=6) //update real time clock
{
write_I2c(0xd0,add_location[add],clock[add]);
add++;
}
lcd_cmd(0x01); //clear lcd
delay(2);
lcd_cmd(0x80);
delay(2);
lcd_display(“RTC WRITTEN”);
do //module password verification
{
for(i=0;i<=15;i++)
{
SBUF=verify_password;
while(TI==0);
TI=0;
}
delay(200);
for(j=0;j<=9;j++)
{
while(RI==0);
Rxsbuf=SBUF;
if(j==9)
{
confirm_code=Rxsbuf; //9th byte is the confirmation code
}
RI=0;
}
}while(confirm_code!=0x00);lcd_cmd(0x01); //clear lcd
delay(2);
lcd_cmd(0x80);
delay(2);
lcd_display(“PWD VERIFIED”);/* do //port control
{
for(i=0;i<=12;i++)
{
SBUF=port_control;
while(TI==0);
TI=0;
}
delay(10);
for(j=0;j<=9;j++)
{
while(RI==0);
Rxsbuf=SBUF;
if(j==9)
{
confirm_code=Rxsbuf;
}
RI=0;
}
}while(confirm_code!=0x00); */while(1)
{
store=enroll;
put_attend=search;
//enrolling fingerprint imageif(store==0)
{
enroll_finger();
}//search fingerprint
if(put_attend==0)
{
search_finger();
}
}
} //end of main -
AuthorPosts
- You must be logged in to reply to this topic.