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 -> microcontroller interfacing help

Status
Not open for further replies.

nXn

Newbie level 3
Joined
Dec 30, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UAE
Activity points
1,339
GPS interfacing help

Hi...
I am working out on interfacing a GPS module to a microcontroller....
I had gone through many web site tutorials and have come to have some small idea..but i still find it difficult for me to interface it to a microcontroller.
My basic doubt is how is the data coming in through the serial port of the microcontroller formated so that each data can be seperated.
Plz help...
 

Re: GPS interfacing help

Every GPS receiver that I know of defaults to sending data in the NMEA format. The data is output in "sentences" consisting of comma-delimited fields. There are numerous references on the web to this format. You may want to start at: https://en.wikipedia.org/wiki/NMEA
 

Re: GPS interfacing help

Thankyou for the reply....I had already read this article .... my doubt was ..say for eg..
$GPAAM,A,A,0.10,N,WPTNME*32 the above data is send by the gsm module..
is it that each data starting from $GPAAM,... is send at a stectch or is it send one by one..
Is it enough that when I am writing a code to read this data that I just initialize a string of sufficient length and read each data separated by comma .Or is it that we have to wait for an iterupt to occur before each comma...
 

Re: GPS interfacing help

nXn said:
Or is it that we have to wait for an iterupt to occur before each comma...
That depends on your hardware & software. You need to wait for the UART to receive the next character before you can read it. Whether you do that by polling the UART Recieve Flag or via an interrupt is up to you.

There are 2 ways that the data is typically read and processed. One is to read the entire string into a buffer and then parse out the data you want. The other is to do "comma counting" as you read the data. In this method you check each character as it's received to see if it's a comma and if so store the data that follows into the appropriate variable based on the 'index' of the preceding comma.
 

Re: GPS interfacing help

Try this **broken link removed**.

I have based my parser on this code and it works perfectly.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top