# Interfacing GPS with Freescale MCU

Status
Not open for further replies.

#### Deepak350

gps mcu

Hi,
I have interfaced a gps receiver (FV-M8) to the MCU. I am looking for the correct sequence of commands (eg:$PMTK.....) to initialise the GPS receiver. Right now the gps receiver is sending some junk values. It is not of the correct NMEA output format. So I think commands need to be sent to initialise gps. Can someone please tell me how to initialise the gps. Thanks Deepak #### hanif ##### Full Member level 4 freescale gps you haven't clearly explain your problem like what NMEA format is your GPS using (foe e.g NMEA-0183), baud rate setting of your controller etc. i would suggest you should have a look on following links, before move further. some information regarding NMEA data will be find on following link. https://www.gpsinformation.org/dale/nmea.htm Regards #### Deepak350 ##### Member level 1 freescale mcu Hi, Thanks for your reply. I have made the hardware connections from the gps receiver to the MCU. I have written a program to receive anything that gps sends (interrupt based). When I look at what I have received, it is not the correct data (like$GPGSA......).

I want to know if I have to first initialise the gps to receive the required info, set baudrate etc.
I have the commands to set baudrate and select the particular nmea output message (like GSA, GSV etc).
But I dont know the steps to do it. Which command to send first and if there is any delay between and also will it send an ack for every command.

Thanks
Deepak

Hi,
Gps is using NMEA-0183 protocol

Cheers

#### hanif

##### Full Member level 4
gps + mcu

baud rate according to NMEA-0183 protocol is 4800 not 9600, so what you need is to set the baud rate of your controller side.

the first step which i recommend is to connect your GPS output (RS 232 serial) to your PC COM PORT (serial port). open hyper terminal in windows from programs->accessories->communication-> hyper terminal
(i assume that you have windows installed)

in Hyper terminal make new connection, it will ask your location info simply cancel and proceed till you find COM port selection window and select COM1 or any other available COM port,make necessary setting like baud rate, pairty etc. select flow control as None.

Now power on your GPS. you will get display like \$GP... etc. , if not change the baud rate in hyper terminal. refer your GPS manual and if not available start trying to change from baud rate setting of hyper terminal from 1200 to 9600 and so on till you get correct data.

following this step will give you the confidence of receiving GPS data well as help you to understand GPS strings format. you can save the displayed text in file.

view following for GPS Mcu interfacing source code

Regards

#### Deepak350

##### Member level 1
gps interfacing in mcu

Hi,

The default baud rate for the GPS is 38400bps, I set my controller to that and now its working fine.
Cheers

Status
Not open for further replies.

Replies
3
Views
3K
Replies
0
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
Replies
0
Views
651