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.

[SOLVED] How to poll a GPS message?

Status
Not open for further replies.

h.v

Junior Member level 2
Joined
May 27, 2008
Messages
22
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,281
Activity points
1,515
Hi

I have connected a GPS to Mega32 via USART; I can successfully read both binary and NMEA messages but cannot write to GPS!!!

For example for polling a GPGLL message ,first I disabled all messages via u-center software(I have a ublox GPS and it can be configured via PC with this software)then I write this code in codevision:

putchar(0x24);//poll GPGLL
putchar(0x45);
putchar(0x49);
putchar(0x47);
putchar(0x50);
putchar(0x51);
putchar(0x2C);
putchar(0x47);
putchar(0x4C);
putchar(0x4C);
putchar(0x2A);
putchar(0x32);
putchar(0x31);
putchar(0x0D);
putchar(0x0A);

but it GPS returns nothing !!!!

1-i connect the MCU-board to GPS cable(tx,rx,gnd at 3.3v) to PC (using a MAX3232)and it sends “24 45 49 47 50 51 2C 47 4C 4C 2A 32 31 0D 0A” to the terminal ,so MCU is working and GPS is getting the 3.3v USART data!!!

2- I connected GPS to PC and used serial monitor software to see what is transmitted between GPS and u-center when I poll GPGLL message from u-center. What is transmitted is the same as above, so GPS needs exactly what I mentioned above!!!

3- I tested all the connections and they are OK

Any idea??

Ps:I think there is something with my software? How do you poll a GPS message in codevision (and read the acknowledge response or the data)
 

I connected GPS to PC and used serial monitor software to see what is transmitted between GPS and u-center when I poll GPGLL message from u-center. What is transmitted is the same as above, so GPS needs exactly what I mentioned above!!!

As you told u-center is a application for communicating with the GPS receiver....
So, when you are trying to transmit “24 45 49 47 50 51 2C 47 4C 4C 2A 32 31 0D 0A” from u-center it might be that it is framed (as per GPS device protocol) further like start, stop bits might be appended to this data by the application and transmitted over serial port...

You do one thing, connect the serial port of your PC to another PC serial port (use only hyperterminal in this PC) and test the frame that is being transmitted out....
If you receive “24 45 49 47 50 51 2C 47 4C 4C 2A 32 31 0D 0A” on the other serial port what you have done in your code is correct...there might be some timing issue...

Leaving all this hope you have configured your serial port baud rate of UC to same as serial port baud rate of GPS....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top