Microcontroller › 8051 › RFID Attendance System
- This topic has 6 replies, 3 voices, and was last updated 10 years, 7 months ago by
Ashutosh Bhatt.
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
August 23, 2014 at 3:51 am #3170
SUnny
ParticipantRFID Attendance SystemHi i m trying to build a Rfid attendance system using 8051(AT89C52). Could someone please tell me what is wrong with code as it compiles without error but woudnt simulate on proteus and also how accurate is proteus compared to real life testing. I am also trying to interface a RTC(DS1307) if someone could help that it would be great aswell.
#include <reg51.h>#include <string.h>#define TOTAL 5void delay_msec(int);void lcd_init();void lcd_data(char);void send(char);void lcd_cmd(char);void lcd_dataS(char *p);void lcd_data_int(int);sbit rs=P2^0;sbit en=P2^1;void serial_init();void serial_txS(char *);void serial_tx(char);void checkID();void printOnTerminal();short int checkTodaysAttd(int);sbit ON=P1^0;sbit RESET=P1^1;sbit result=P1^2;sbit IR_Tx=P1^3;sbit IR_Rx=P1^4;sbit Reset_Todays_Attendence=P1^5;void lcd_init(){delay_msec(20);send(0x30);delay_msec(10);send(0x30);delay_msec(1);send(0x30);delay_msec(1);send(0x20);delay_msec(1); // upto here we call it as RESETting of LCD,// and telling the LCD that we are using 4bit modelcd_cmd(0x06);lcd_cmd(0x01);lcd_cmd(0x28);lcd_cmd(0x0e);}void send(char value){char temp;temp= P2 & 0x0f; //store the higher nibble of P2 in tempP2= temp | value; //now bitwise OR the value with temp,//which successfully sends data(higher nibble) to P2 without//effecting its prevoius data in the lower nibbleen=1;delay_msec(1);en=0;}void lcd_cmd(char cmd){char temp;temp=cmd &0xf0; //masks (makes zero) the lower nibblers=0;send(temp); //now send the higher nibbletemp=cmd<<4; //now left shift 4 times which shifts lower//nibble to higher nibbletemp=temp&0xf0; //now mask lower nibble againsend(temp); //and send to the LCD}/*void lcd_data(char d){char temp;temp=d &0xf0;rs=1;send(temp);temp=d<<4;temp=temp&0xf0;send(temp);} */void lcd_dataS(char *p){char temp;while(*p!=’