h.v
Junior Member level 2
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 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)