Microcontroller › 8051 › help for finger print based attendance monitoring system
- This topic has 3 replies, 3 voices, and was last updated 11 years, 7 months ago by RAJI G.
-
AuthorPosts
-
January 16, 2013 at 10:16 am #2072BHARATH.S.HEGDEParticipant
Hai,
This is third time I am posting my problem in the site, I have’t got any reply last tow times, please help me to fix the problem.
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 the code or if you have the code for that please send the code to “[email protected] 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
February 14, 2013 at 7:34 am #9132Syed AameerParticipanthave you connected the pull up resistors for port 0..if not means i think u may not get the output
February 14, 2013 at 8:39 am #9133BHARATH.S.HEGDEParticipantya i have connected the pull up resisters correctly
February 14, 2013 at 11:01 am #9135RAJI GParticipantcheck the voltage levels in the corresponding pin using cro or multimeter or better u usae LEDs
-
AuthorPosts
- You must be logged in to reply to this topic.