Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/18/07 21:24
Read: times


 
#137487 - 8051 and GPS
Responding to: ???'s previous message
Hello Hashem A. Ghalib,

Most GPS receivers output data like what is shown below at 4800 baud, 8 data bits, no parity 1 stop bit.

The first step in getting this under control is to get a program which will show the data. Hyper terminal from Windows will do this.

Writing a program to capture the data is straight forward. Simply look for the proper characters (i.e., $GPRMC) as they arrive in your data input and when they are recognized just start capturing the data until you see a 0x13 or 0x10 character.

Now you have the data in your buffer and you can start to parse it. Start by looking for the comma character and trimming off the data fields you need.

This might seem overwhelming at first but a step by step process you will have your solution.

Regards,

Charles Bannister

$GPGSA,A,2,16,14,03,,,,,,,,,,1.43,0.82,1.17*09
$GPGSV,3,1,10,03,71,334,31,22,49,029,28,14,44,122,31,19,40,329,00*77
$GPGSV,3,2,10,16,33,199,29,01,23,173,00,18,18,038,00,21,06,077,00*7F
$GPGSV,3,3,10,11,03,290,00,20,02,229,00*79
$GPRMC,193058,A,2117.0755,N,15750.2589,W,0.306,291.8,180407,9.8,E*6C
$PRWIZCH,18,2,16,7,22,2,14,7,00,0,21,2,03,7,19,0,01,0,11,0,20,0,00,0*48
$GPGGA,193059,2117.0753,N,15750.2593,W,1,03,0.82,139.9,M,4.7,M,,*50
$GPGSA,A,2,16,14,03,,,,,,,,,,1.43,0.82,1.17*09
$GPRMC,193059,A,2117.0753,N,15750.2593,W,0.202,351.2,180407,9.8,E*62
$PRWIZCH,18,2,16,7,22,2,14,7,00,0,21,2,03,7,19,0,01,0,11,0,20,0,00,0*48
$GPGGA,193100,2117.0749,N,15750.2598,W,1,03,0.82,139.7,M,4.7,M,,*53
$GPGSA,A,2,16,14,03,,,,,,,,,,1.43,0.82,1.17*09
$GPGSV,3,1,10,03,71,334,31,22,49,029,28,14,44,122,32,19,40,329,00*74
$GPGSV,3,2,10,16,33,199,29,01,23,173,00,18,18,038,00,21,06,077,00*7F
$GPGSV,3,3,10,11,03,290,00,20,02,229,00*79
$GPRMC,193100,A,2117.0749,N,15750.2598,W,0.544,252.6,180407,9.8,E*6C
$PRWIZCH,18,2,16,7,22,2,14,7,00,0,21,2,03,7,19,0,01,0,11,0,20,0,00,0*48
$GPGGA,193101,2117.0745,N,15750.2601,W,1,03,0.82,139.4,M,4.7,M,,*5E
$GPGSA,A,2,16,14,03,,,,,,,,,,1.43,0.82,1.17*09
$GPRMC,193101,A,2117.0745,N,15750.2601,W,0.343,98.4,180407,9.8,E*55
$PRWIZCH,18,2,16,7,22,2,14,7,00,0,21,2,03,7,19,0,01,0,11,0,20,0,00,0*48
$GPGGA,193102,2117.0740,N,15750.2605,W,1,03,0.82,139.2,M,4.7,M,,*5A
$GPGSA,A,2,16,14,03,,,,,,,,,,1.43,0.82,1.17*09
$GPGSV,3,1,10,03,71,334,29,22,49,029,28,14,44,122,31,19,40,329,00*7E
$GPGSV,3,2,10,16,33,199,29,01,23,173,0

List of 13 messages in thread
TopicAuthorDate
Interfacing between microcontroller and GPS            01/01/70 00:00      
   yes so            01/01/70 00:00      
      Exactly!            01/01/70 00:00      
   Tutorials on the left            01/01/70 00:00      
   Additional details for my problem            01/01/70 00:00      
      Formatted            01/01/70 00:00      
         Thanks            01/01/70 00:00      
            Did it work?            01/01/70 00:00      
   8051 and GPS            01/01/70 00:00      
      Special thanks            01/01/70 00:00      
      GPS+microcontroller+time            01/01/70 00:00      
         Already Answered            01/01/70 00:00      
            hi ,is my format is true            01/01/70 00:00      

Back to Subject List