CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

read GPS NMEA data using PIC18F452

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ricky



Joined: 19 Sep 2005
Posts: 1

View user's profile Send private message

read GPS NMEA data using PIC18F452
PostPosted: Mon Sep 19, 2005 3:45 am     Reply with quote

Hi,
I wish to read off NMEA data off OEM GPS receiver using a PIC18F452 and display it on LCD. Can someone please give me hints on how to do this in terms of code writing or good links? Any help will be much appreciated.

Thanks in advance,
Ricky
EmbdFreak



Joined: 28 Jul 2005
Posts: 23

View user's profile Send private message

Reading GPS NMEA strings
PostPosted: Mon Sep 19, 2005 4:28 am     Reply with quote

Well, as u know the output of GPS on RS-232 are NMEA strings followed by the data each one holds. Each string starts with a '$' sign followed by several information fields. There are about 10-15 NMEA strings an average GPS gives (depends on model). Now you have which string contains the data u need, e.g. 'GPRMC' gives u latitude, longitude, lat hem, long hem, UTC date,time etc.. . each one is separated by a comma. So u need to implement a kind of parser which will parse this data until a CR,LF is detected, which ends the string. Ur program design should look for '$',upon recieval count number of commas and keep storing/displaying your field of interest. As for LCD, use lcd.c with any hd44780 based lcd display.
I hope this gets u going,

Regards,
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

More advice
PostPosted: Mon Sep 19, 2005 7:47 am     Reply with quote

The GPS sentences are spoken by most GPS receivers about once every second without regard to the state the PIC is in ( asynchronously). You will need a circular buffer to buffer a complete sentence ( 40 to 60 bytes). Look at postings for writing an interrupt driven circular buffer based on an RDA interrupt when a char is received. Do all of the preparation for display to the LCD in your main code and leave the ISR ( interrupt service routine) to filter out unwanted sentences and place good data in the buffer.
pe1icq



Joined: 29 Aug 2005
Posts: 12

View user's profile Send private message

PostPosted: Mon Sep 19, 2005 8:31 am     Reply with quote

I've recently worked on an update of an implementation on the 16f628, but it was written for the HiTech compiler.
http://sharon.esrac.ele.tue.nl/users/pe1rxq/aprstracker/aprstracker.html
This implementation processes GPGGA and GPVTG sentences.

You could also have a look at SOTT (version 1.0). It is a similar application but written using the CCS compiler. This one works with GPRMC sentences.
You can find it in the files area on http://groups.yahoo.com/group/TinyTrak/


//Arno
Guest








PostPosted: Mon Sep 19, 2005 9:48 am     Reply with quote

http://www.vermontficks.org/pic.htm

Look at the GPS repeater project, the code is in CCS C.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group