working with gps,using XCTU,MAX232,female serial to serial convertor,and atmega16 kit

female to male to usb covertor along with RS232
output of GPS on XCTU




















Hello everybody,
so myself in BRiCS working out with mine GPS Receiver for getting the data on my LCD screen so that i can save the LATITUDE,LONGITUDE,ALTITUDE ,VELOCITY<DAE and TIME in some variable so that i can further use them in my MAIN programme as a INPUT in HAVERSINE formula for finding out the distance(D) and bearing(A) between 2 GPS coordinates.well i am trying out some codes using WINAVR and ECLIPSE on JAVA platform.well i had done a little work in gps,but i am trying mine level best to short out this problem.well need help if any one can,in coding.#include<avr/io.h>
#include<util/delay.h>
#include"lcd_lib.h"
#include<stdio.h>

int main()


{ int ptr=0;
char A[20]="";
char ii;
DDRD=255;
LCDinit();
LCDclr();
USART_Init(9600);
while(1)
{
LCDGotoXY(0,0);
while(ii!='$'){
ii=USART_Receive();
LCDsendChar(ii);
ptr++;
if(ptr>16)
{
break;
}
}
A[0]=USART_Receive();
_delay_ms(100);
A[1]=USART_Receive();
_delay_ms(100);
A[2]=USART_Receive();
_delay_ms(100);
A[3]=USART_Receive();
_delay_ms(100);
A[4]=USART_Receive();
_delay_ms(100);
A[5]=USART_Receive();
_delay_ms(100);
A[6]=USART_Receive();
_delay_ms(100);
A[7]=USART_Receive();
_delay_ms(100);
A[8]=USART_Receive();
_delay_ms(100);
A[9]=USART_Receive();
_delay_ms(100);
LCDstring(A,10);
}
return 0;
}

Loading...
.

  © Copyrights Suryaan 2011 CEST

Back to TOP