Navlock GPS
stoani96
Posts: 9
Hi!
First of all, i'm new here, so i dont know if the place for this thread is right. If not, you can change the location
The next thing: I'm not a english speaking(maybe you already noticed ), but ill try my best
i'm pretty new at Propeller or Spincodes and i wanted to read data out of a gps module. For that i bought a gps module from Navlock(here's the datasheet)
But the problem is: Nothing i try, wants to work!
Here is one of my trys:
2013021502.spin
like you can see, i've 5 leds. the code above should look for a "$"(start of new dataline) and "print" the character after it. how this "printing" should work: i.e. 234: then the third led will blink 2 times, the second 3 times and the first one 4 times
But it is nothing happening! so no "$" is found.... why?!?
(i also tried it with a boudrate of 4800, because i read, that most of the gps modules use this and the object i use is only tested with 19800baud, and i really got something, but only, sry, bullsh**[sometimes values over 200! wide over ascii])
i also tried this:
2013021503.spin
this should save all the "1"s and "0"s and "print" them after recodering 50... but i just get 0..... O.o
How is that possible?!? in the first programm i get anything, not only 125, 126, 255, 256 or 0, and then in the second program i get only 0s....... WHY?
I'm really desperate.... Can anyone help me?
Any tips?
What are the problems of the programs?
How can i fix that?
Or has anyone a object that could help me?(i allready tried the object from this)
thx
stoani96
2013021503.spin
2013021503.spin
First of all, i'm new here, so i dont know if the place for this thread is right. If not, you can change the location
The next thing: I'm not a english speaking(maybe you already noticed ), but ill try my best
i'm pretty new at Propeller or Spincodes and i wanted to read data out of a gps module. For that i bought a gps module from Navlock(here's the datasheet)
But the problem is: Nothing i try, wants to work!
Here is one of my trys:
2013021502.spin
like you can see, i've 5 leds. the code above should look for a "$"(start of new dataline) and "print" the character after it. how this "printing" should work: i.e. 234: then the third led will blink 2 times, the second 3 times and the first one 4 times
But it is nothing happening! so no "$" is found.... why?!?
(i also tried it with a boudrate of 4800, because i read, that most of the gps modules use this and the object i use is only tested with 19800baud, and i really got something, but only, sry, bullsh**[sometimes values over 200! wide over ascii])
i also tried this:
2013021503.spin
this should save all the "1"s and "0"s and "print" them after recodering 50... but i just get 0..... O.o
How is that possible?!? in the first programm i get anything, not only 125, 126, 255, 256 or 0, and then in the second program i get only 0s....... WHY?
I'm really desperate.... Can anyone help me?
Any tips?
What are the problems of the programs?
How can i fix that?
Or has anyone a object that could help me?(i allready tried the object from this)
thx
stoani96
2013021503.spin
2013021503.spin
Comments
Of course i tried that:2013021701.spin
but that gives me some pointless formations of 0s and 1s
for example: That makes no sense in my eyes....
Can anybody tell me if i'm just false(that that makes no sense) or
tell me whats wrong with my spincode?
thx
stoani96
;(
bytes[index] := ina[30] reads one bit and stores it into a byte variable. It can only have the value of 1 or 0. Which is what you get when you write out the array.
In your first spin program 2013021502 you are using Simple Serial with a baud rate of 38,400. The comment at the beginning of Simple Serial says it is only good up to 19,200.
Try FullDuplexSerial
John Abshier
I'm not sure what you mean with your first paragraph... i WANT to get the 1s and 0s so i can figure out what this thing sends because if i try to get a full byte and let it interpret it by the chip i get something like "$" but only randomly....
i know that the comment says that it is good up to 19.2kbaud, but it was worth a try ;-)
thx for the tipp i will try fullduplexserial a bit later.... but i will post my results here
mfg
stoani
John Abshier
Maybe this program will help get you started. Here is a small but complete working GPS receive program that reads from a Parallax PMB-688 SIRF GPS module and displays messages to the serial terminal.
Change the port and baud to your GPS settings, start the program, start the Parallax serial terminal and set it to receive at 115200 from your propeller PC port. See if this works.
okay.... its a bit embarrassing, but i didn't know that it is THAT easy to get some information to the pc: Parallax Serial Terminal!!!
But i still got a problem.... it still does not work!
i wrote something like this:
but this gives nonesense...
[code]p
John Abshier
like you can see i use the USB connection for the serial terminal:
terminal.start(115200)
so i dont think that this is a problem, is it?
John Abshier
I trusted the code(parallax seriel terminal) way too much!
I really thank you for that!
One last(for now ^^) question: can i change the pins that are used by the seriel terminal code?(i tried it seems that does not work.. is that right?)
mfg
stoani
You connected your GPS module serial output wire to one of the propeller pins, right?
Your serial receive object needs to listen to THAT port, the port that connects to the pin the GPS is wired to, NOT ports 30 or 31.
PUB StartRxTx(rxpin, txpin, mode, baudrate) with this method you can use any transmit and receive pins you want. BUT the USB connector on your Propeller board is probably wired to pins 30 and 31.
John Abshier
The USB connection runs over pins 30 and 31. and i didnt know that when i solderd on the gps. so it is right that i used pins 30 and 31, but it was pointless because of the fact that the usb connector is there
I will fix the soldering asap and then it should finally work! ^^
I will keep you up to date
finally something to john abshier: i always look to the codes(ofcourse sometimes too inaccurate ) and i know that you can choose any pin for the serial terminal and like you can see abouve, i also know that the usb connection is on 30 and 31. so the problem is solved for now
stoani
Thanks to every one here! I learnt a much!