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.

gps interfcing 8051.................

Status
Not open for further replies.
store data in array only after $ symbol is matched or else ignore all the data before this... store the data in the array and print it as long lat and any other parameters... thats all
 

store data in array only after $ symbol is matched or else ignore all the data before this... store the data in the array and print it as long lat and any other parameters... thats all

sir your tell to store the data first and then match that data with '$' and again store it in another array..

---------- Post added at 12:14 ---------- Previous post was at 12:10 ----------

sir i want to read $GPGGA only not all ..
 

its pity you dont understand the simple english sentence....... I am withdrawing myself from this thread and you can get help from others.........

Its simple receive the data but dont store it... compare the received data for $GPGGA and then the following data has to be displayed.....
 

sir if u have code plz pass
 

check this its a simple logic

Code:
void recv4mgps(void)
{
	unsigned char gp='\0',i;
	
	while(gp!='$')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		}
		gp='\0';
		while(gp!='G')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		}
		gp='\0';
		while(gp!='P')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		}
		gp='\0';
		while(gp!='G')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		}
		gp='\0';
		while(gp!='G')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		}
		gp='\0';
		while(gp!='A')
		{
			while(RI==0);
			gp=SBUF;
			RI=0;
		} 

		for(i=0;i<12;i++)
		{
			while(RI==0);
			RI=0;				
		}

		for(i=0;i<12;i++)
		{
			while(RI==0);
			LAT[i]=SBUF;
			RI=0;				
		}
		while(RI==0);
		RI=0;
		for(i=0;i<12;i++)
		{
			while(RI==0);
			LONG[i]=SBUF;
			RI=0;				
		}

			LAT[i]='\0';
		LONG[i]='\0';

	lcd_cmdwrt(0x01);
	lcd_datawrt(LAT);
	delay(150);
	lcd_cmdwrt(0xc0);	
	lcd_datawrt(LONG);
    delay(150);
		
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top