Microcontroller › 8051 › problem interfacing gps with 8051
- This topic has 3 replies, 3 voices, and was last updated 9 years, 10 months ago by Jason Jordon.
April 2, 2013 at 11:24 am #2223saraParticipant
I have been interfacing gps modem with 8051 with correct connection as per your circuit diagram and followed the code given under EG labs.
The program is given with comments which is very helpful but I am having difficulty in decoding the line in the given program , i.e
if(check==69)… the program is not satisfying this condition and hence not going into the compare loop and not reading the latiitude and longitude values from the GPS receiver.
Please clarify and help me out. Or provide me with an alternate program at the earliest possible..
Thanks in advance.April 2, 2013 at 4:28 pm #9415AJISH ALFREDParticipant
It would have been more easier for us to help you if you share the location of the code in this site.April 3, 2013 at 12:42 pm #9425saraParticipant
In this site u can go to EG labs >> MICROCONTROLLER >> 8051 >> How to interface gps with microcontroller 8051 >> code and you can find the code there..
for convenience the program is as follows..
/* Basic program to show latitude and longitude on LCD extracted from GPGGA statement */
#define port2 P2
sbit rs = P1^0;
sbit rw = P1^1;
sbit e = P1^2;
unsigned int check=0,i;
unsigned char a;
void delay(unsigned int msec)
int i,j ;
// LCD COMMAND SENDING FUNCTION
void lcd_cmd(unsigned char item)
port2 = item;
// LCD DATA SENDING FUNCTION
void lcd_data(unsigned char item)
port2 = item;
// LCD STRING SENDING FUNCTION
void lcd_string(unsigned char *str)