GPS Doubt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Hello!

   

I´m doing a project using a GPS module (A2035-H) but I have some doubt with the protocol,I don´t know how to receive the message from GPS module because the chip recieve a lot of BYTES from the module, so I don´t know how can I save the information and display to the computer, and how send the code to recieve this information. someone can help me? I´m using cy764215-28pvxc

0 Likes
14 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

GPS connection is usually done using RS232 at TTL-level. So a simple UART usermodule would do the job.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 thanks bob! 
 

   

I have another answer if i want to know the position, I have to send "$GPGGA" from PSoC?

   

and how receive the parameters from GPS module?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

That looks like the NMEA command -

   

 

   

    

   

          https://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual-Rev2.1-Dec07.pdf

   

 

   

Also, use CMOS interface, a little more noise margin than TTL.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thanks danna for the information, I have another doubt is possible save a string in a char?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

A string is an array of chars. For example -

   

 

   

char myString[ 21] = "This is a test";         // This stores the string into the array in SRAM terminated by a NULL , '\0'

   

const char myString[21] = "This is a test";        // This stores the string into the array in FLASH terminated by a NULL , '\0'

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into a (my favourite) C-language manual: publications.gbdirect.co.uk/c_book/

   

There you get introduced into the connection between pointers and strings.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Another C manual, attached.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 thanks I check the document

0 Likes
Anonymous
Not applicable

 hello I wrote this code to receive a string and then save it in an array. when I recived string and  then I send that string to display in a terminal, when I send a string first time work, but when I send the next string I see the first string that I sent before in the terminal and I don't know why. 
 

   

if(str = UART_szGetRestOfParams()) {

   

Latitud[0] = *str;

   

Latitud[1] = *(str+1);

   

Latitud[2] = *(str+2);

   

for (i =0; i <3; i++)

   

UART_PutChar(Latitud);

   

UART_PutCRLF();

   

   

}

   

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I think its best if you post entire project for forum to look at -

   

 

   

     

   

“File”

   

“Archive Project”

   

Use Firefox or IE, not chrome to post.

   

  

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Hello I  solved the problem, I forgot put the function UART_CmdReset();

   

Thanks for answer me and for your help 🙂

0 Likes
Anonymous
Not applicable

Hello I used in my code the function UART_sz GetRestOfParams() and also proved with UART_sz GetParam() and both work, but Wich is the difference beetwen these functions

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

... as the name of the function tells:

   

Parameters are separated from each other by the specified delimiter (a space 0x20 as default) and a command may have many parameters

   

GetParam() returns the actual parameter and advances to the next, so that a consecutive call will deliver all parameters one by one.

   

GetRestOfParams() will -beginning at the actual param- return all the not yet gotten parameters at once, as a single string.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks bob for your help and your explanation 🙂

0 Likes