- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GPS connection is usually done using RS232 at TTL-level. So a simple UART usermodule would do the job.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks danna for the information, I have another doubt is possible save a string in a char?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks I check the document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello I solved the problem, I forgot put the function UART_CmdReset();
Thanks for answer me and for your help 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks bob for your help and your explanation 🙂