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 with PIC microcontroller

Status
Not open for further replies.

monika varshney

Newbie level 5
Joined
Apr 12, 2008
Messages
10
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,283
Activity points
1,373
pic gps

I am working on GPS. i have to read the GPS data through PIC microcontroller and display it on hyperterminal (for example). I have written a code for it but i m not getting the GPS output. I m able to communicate with PC through keyboard. But when i connect the GPS receiver it is not working. here is the some part of my code...

while(1)
{
read=get_ch();
msg_rec=read;
i++;
}

msg_rec='\0';

while(msg_rec[j]!='\0')
{
putch(msg_rec[j]);
j++;
}

where putch and get_ch are the user defined functions for receiving and transmitting.

can anybody suggest me where m i wrong.
 

pic microcontroller gps

yes of course... you are not reading in while(1) which will run unlimited time and the codes below will never be reached.

Code:
while(1){
i=0;
while((ch=get_ch())!='\n')
{
msg_rec[i]=ch;
i++;
}

msg_rec[i]='\0';
j=0;
while(msg_rec[j]!='\0')
{
putch(msg_rec[j]);
j++;
}
}

This should work fine. Only check if the GPS data ends with \n or anything else.

I think this will help.
 

gps pic

I have already done this...I have ended my loop with carriage return....but result was same..hyperterminal displays nothing...
 

gps with pic microcontroller

Well. The easiest possible move we both are forgetting... That will be .. "What you receive is what you send" ;)

Code:
while(1){
ch=get_ch();
putch(ch);
}

Try this and this will work.

Good luck
 

pic gps code

I have already done it and this is working fine. But I have to store the received characters in an array so that i can perform some task on it.

can there be an issue of oscillator frequency for storing characters in the array????

or
is there any other method for storing received characters in an array???? I am not sure but i read in the PIC 16F690 datasheet....that we can read and write data to EEPROM and flash....so is there any issue related to this??? may be i have to store the received character in the memory and then have to read from there.....
 

gps pic microcontroller

what GPS do u use?
 

gps to pic

I am using fastrax uTracker130-LLP GPS receiver module...
 

hi if i use gps skm53 to interface it with pic 16f877 to display latitude on lcd what the idea of code ??
 

the main problem is you are not reading in the exact form. First you need to wait for a $ symbol. Then you need to store header in an array of size 6. Check this header contains latitude and longitude. If it is the right sentence, then store the latitude and longitude in two arrays. Display it in lcd.





Me from my mobile. So i cannot attach the code if you need the code i'll send you soon
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top