GPS and RF Problem
Jose Porto
Posts: 3
Hi there, I bought a GPS module, plus a 433 Mhz RF Module from Parallax. Exactly the ones in the following pages:
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/gps/List/0/SortField/4/ProductID/757/Default.aspx
http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/Level/a/ProductID/582/Default.aspx
Only when they arrived did I noticed that there is no spin code examples of their operation. I also have a Propeller Professional Development Board Rev A, everything is connected has it should, but I have no clue. It seams that the basic stamp code that they have as example depends a lot on serout and serin.. well this is not available in spin, and honestly I've tried the BS2SPIN library but it gets even more complicated.
Can anyone help me and teach me how to write a simple program to interface with the GPS antenna that does the following.
START
SEND a request to de Sio port, currently 24 in my development board.
LISTEN for a response from the Sio port since this component seams to work tx and rx on the same port.
STORE the response in a string so that it can then be treated and read by the user (me in this case)
As far has the 433 RF module... I have no clue on how this works... really, they forgot about spin developers. I'm new to this type of coding and parallax has no documentation, asides from the dimension of the PCB, the power consumption. I have no clue on how to simply send "test" from A to B and get that same string in B for processing!
Please help me or I will be stuck on this for a long long time... since I do a search on OBEX for GPS and I get 3 entries or so... all of them for discontinued hardware or basic stamp!
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/gps/List/0/SortField/4/ProductID/757/Default.aspx
http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/Level/a/ProductID/582/Default.aspx
Only when they arrived did I noticed that there is no spin code examples of their operation. I also have a Propeller Professional Development Board Rev A, everything is connected has it should, but I have no clue. It seams that the basic stamp code that they have as example depends a lot on serout and serin.. well this is not available in spin, and honestly I've tried the BS2SPIN library but it gets even more complicated.
Can anyone help me and teach me how to write a simple program to interface with the GPS antenna that does the following.
START
SEND a request to de Sio port, currently 24 in my development board.
LISTEN for a response from the Sio port since this component seams to work tx and rx on the same port.
STORE the response in a string so that it can then be treated and read by the user (me in this case)
As far has the 433 RF module... I have no clue on how this works... really, they forgot about spin developers. I'm new to this type of coding and parallax has no documentation, asides from the dimension of the PCB, the power consumption. I have no clue on how to simply send "test" from A to B and get that same string in B for processing!
Please help me or I will be stuck on this for a long long time... since I do a search on OBEX for GPS and I get 3 entries or so... all of them for discontinued hardware or basic stamp!
Comments
For the transceiver, anything that you send on the serial line will be replicated by the receiver unit on it's RX line. From the documentation, for BS2:
So, in this example the transmitter sends 5 bytes: a ! and two two-byte numbers.
Most objects in Spin will require some sort of initialization at the beginning of the program, and FullDuplexSerial plus is no different. To send it in Spin using the FullDuplexSerialPlus object would be something like:
The GPS module will use a similar procedure, but you'll probably want to have the bs2 code open so you can just mechanically translate it to spin.
All that is only relevant if you want to use the binary protocol. And if you choose to use the binary protocol, make sure you know how to reset the GPS unit back to defaults, or how to set it back to NMEA Text strings.
SirfDemo http://www.falcom.de/support/software-tools/sirf/
SirfDemo User Guide http://www.falcom.de/uploads/media/Manual_SiRFDemo3.87.pdf
SiRF Binary Protocol Reference Manual http://gpsd.googlecode.com/files/SiRF-SiRF-v2_4.pdf
NMEA 0183 Protocol http://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual1.pdf
Or you can avoid all that and just use the commands described in the Parallax documentation. I am playing with this and will connect it to the Propeller when I get part of another project working right, might be a few weeks.
NOTE: any GPS code in OBEX should work with almost any GPS unit set to factory defaults, provided it is properly connected. Its just a matter of parsing standard GPS strings from serial input..
http://obex.parallax.com/objects/347/ should get you started, you just need to change the RX, TX, and BPS settings to mach your setup, load the propeller, then open the serial terminal to see the debug output from your GPS.