Forum Replies Created
Viewing 1 post (of 1 total)
-
AuthorPosts
-
September 24, 2014 at 9:44 am in reply to: I have some problem regarding RFID madule interfacing….. #12226Rahul RayParticipant#include<reg51.h>#include<string.h>#include <intrins.h>#define cmdport P3#define dataport P2sbit rs = P3^0; //register select pinsbit rw = P3^1; //read write pinsbit e = P3^2; //enable pinsbit motor_pin = P0^7;unsigned int data_out,temp;unsigned char card_id[12];code unsigned char RFID_1[]=”FE00458C2413″;code unsigned char RFID_2[]=”4E007051B8D7″;void Delay(unsigned int);void Delay_servo(unsigned int);void recieve() //Function to recieve data serialy from RS232{unsigned char k;for(k=0;k<12;k++){while(RI==0);card_id[k]=SBUF;RI=0;}}void delay(unsigned int msec) //Function to provide time delay in msec.{int i,j;for(i=0;i<msec;i++)for(j=0;j<1275;j++);}//void Delay(unsigned int ms)//{// unsigned long int us = ms*1000;//while(us–)// {// _nop_();//}//}void Delay_servo(unsigned int us){while(us–){_nop_();}}void lcdcmd(unsigned char item) //Function to send command to LCD{rs= 0;rw=0;e=1;dataport = item;delay(10);e=0;delay(10);}void lcddata(unsigned char iitem) //Function to send data to LCD{rs= 1;rw=0;e=1;dataport = iitem;delay(10);e=0;delay(10);}void lcd_init(){lcdcmd(0x38);lcdcmd(0x0E);lcdcmd(0x01);}//void lcd_string(char add,char *str)void lcd_string(char *iitem){int i;//lcdcmd(add);for(i=0;iitem!=’