Microcontroller › 8051 › RFID BASED TOLLPLAZA › Hi sachin,
April 23, 2014 at 6:59 pm
#11621
ghuran
Participant
Hi sachin,
sorry for the delay,i was busy in my practical exam….
here is the tested code for rfid based toll plaza….
#include<reg51.h>
#define port P1
#define key P0 // Port for keypad
void memory();
sfr lcd_data_pin=0x80;
sbit rs = P3^5;
sbit rw = P3^6;
sbit en = P3^7;
sbit col1=key^4;
sbit col2=key^5;
sbit col3=key^6;
sbit row1=key^0;
sbit row2=key^1;
sbit row3=key^2;
sbit row4=key^3;
unsigned int number=0,pointer=1;
unsigned char card_mem[4][12];
unsigned char card_id[12],index=0,key1=0,lcd,print=0,new_user=0,recharge=0,user_index,t,tool=0;
unsigned int amount[4];
unsigned char current_byte = 0,money[6];
unsigned char pos=0,set=0;
void delay(unsigned char count) //Function to provide time delay
{
unsigned int j;
unsigned char i;
for(i=0;i<count;i++)
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char comm) //LCD command funtion
{
lcd_data_pin=comm;
en=1;
rs=0;
rw=0;
delay(5);
en=0;
}
void lcd_data(unsigned char disp) //LCD data function
{
lcd_data_pin=disp;
en=1;
rs=1;
rw=0;
delay(5);
en=0;
}
lcd_string(unsigned char *disp) //LCD string function
{
char x;
for(x=0;disp[x]!=’