Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RFID and MAX232 connection with microcontroller

Status
Not open for further replies.
this is the code i added in my while(1) in main pgm.check and tell
Code:
while(1)
{
for(z=0;z<7;z++)  //command to display "swipe"
{
display(id[z]);
}	
delay(20);    //20sec delay
if(byte==8)
{
get();
}
delay(10); //10 sec delay to display the name
byte=0;
for(z=0;z<7;z++)  //again displaying "swipe"
{
display(id[z]);
}
delay(20);
if(byte==8)
{
get();
}
} 
}
 

What is this code doing?
Code:
 for(z=0;z<7;z++)  //command to display "swipe"
{
display(id[z]);
}
what is id[z]? You code is wrong. Why you are not using the code I posted?

why are you using this code 2 times in the while loop? It is not necessary.

In your code the below code is repeated 2 times
Code:
for(z=0;z<7;z++) //command to display "swipe"
{
display(id[z]);
}	
delay(300);
if(byte==8)
{
get();
}
delay(100);
 

i declared like id[7]="swipe".for displaying i'm using like this
 

Can't you use
Code:
 lcd_string("swipe");
instead of your
Code:
 for(z=0;z<7;z++) //command to display "swipe"
{
display(id[z]);
}


use any of the 2 codes given below.

Code:
while(1)
{
	if(byte!=8) {
		for(z=0;z<7;z++)    		//command to display "swipe"
		{	
                        display(id[z]);
		}

		delay(20)	    		//20sec delay
	}	
	else if(byte==8)
	{
		//clear display here
                get();
		delay(10); 	    		//10 sec delay to display the name
		byte=0;
                //clear display here
	}
 
}

//or

while(1)
{
	if(byte!=8) {
		lcd_string("Swipe your Card");
		delay(20)	    		//20sec delay
	}
	else if(byte==8)
	{
		//clear display here
                get();
		delay(10); 	    		//10 sec delay to display the name
		byte=0;
                //clear display here
	}
 
}
 
Last edited:

ya...i can give in both the way..but then also its not working...it displaying "swipe" continuously since it is in while loop..nothing is displaying other than that.
 

try the code I have posted in my last post. There are 2 codes, use any one of them.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top