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

Velocity meter with GPS module(u-blox RCB-4H) and PIC16F877A

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



Joined: 03 Jun 2010
Posts: 4

View user's profile Send private message

Velocity meter with GPS module(u-blox RCB-4H) and PIC16F877A
PostPosted: Thu Jun 03, 2010 1:43 pm     Reply with quote

Hello everybody;

I want to use the GPVTG string in NMEA protocol. Example;

$GPVTG,77.52,T,,M,0.004,N,0.008,K,A*06

The 0.008 shows the speed in terms of km/h. My project is about that. Firstly I want to take this speed information and send it to the LCD. I know how to show any number or word in LCD but;

My problem is that I don't know how to read and process the NMEA data strings which are sent from GPS module with PIC.

I am also new in codes but;

Can anyone help me about reading NMEA string with CCS C software codes??
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Jun 03, 2010 6:46 pm     Reply with quote

This may not be for a beginner.
Your GPS will repeat sentences when it wants. This means you will need a circular buffer fed by an isr char by char. The sentence $GPVTG should be gated into the buffer and all others rejected. A flag is set in the isr when the $GPVTG is fully received. Next you will write a parsing routine that will break the sentence down between commas. If speed is used in any meaningful way you will need to calculate the crc for the sentence in that way you know you have valid data. These parsing and crc routines will be in your main code.
Caveat
This information is not to be used for any navigational purposes or for any other purposes in which your safety or the safety of others may be at risk.
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