+ Reply to Thread
Results 1 to 5 of 5

Thread: GPS and RF Problem

  1. #1

    Default GPS and RF Problem

    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/StoreSearchR...7/Default.aspx

    http://www.parallax.com/Store/Access...2/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!

  2. #2

    Default Re: GPS and RF Problem

    There are a few threads on using those RF modules for data transmission with the Propeller. They aren't all that suitable (the nRF24L01+ is much better), but they can be persuaded to work.
    Leon Heller
    G1HSM

  3. #3

    Default Re: GPS and RF Problem

    You can use FullDuplexSerialPlus (available in the obex {edit: it's for some reason not available in the obex, but a google search will turn it up.}) as a serial communication object (like SEROUT and SERIN).

    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:
    Code:
    DO
       PULSOUT 0, 1200       'Sync pulse for the receiver
       SEROUT 0, 16468, [ "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
       x = x + 1
       y = y + 1
       PAUSE 10
    LOOP
    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:

    Code:
    serialobj.start(rxpin, txpin, 0, 9600)
    DIRA[radio_pulse_pin]~~ 'set the pin to output
    
    'somewhere later...
    OUTA[radio_pulse_pin]~~ 'set the pin high
    waitcnt(clkfreq/1000*100 + cnt) 'pulse high time
    OUTA[radio_pulse_pin]~ 'set the pin low
    serialobj.tx("!")
    serialobj.tx( (x&$FF00)>>8) 'get the high byte of x
    serialobj.tx( (x&$FF) ) 'get the low byte of x
    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.

  4. #4

    Default Re: GPS and RF Problem

    I found a great library called GPS_SmartMode by Gary Noel Boon, PhD that simply did the trick. All I needed was something to point me in the right direction and I am now working with the GPS at full throttle. Thanks SRLM for your post also, that's probably all I need to know to figure the rest out for my self. I will, however, try to find time to make some sort of object that simplifies the whole process in the future so that I can build a two way, radio communication device. If I ever get that done I will post it here.

  5. #5

    Cool Re: GPS and RF Problem

    You can get more data out of any GPS that uses the SirfStar III chipset. You can download the SirfDemo software if your module can be connect directly to a PC and play with it to understand what the various commands do and say. The SiRF commands for the binary protocol are not all supported in each SiRFStar III, it all depends on the software version embedded in the GPS. For instance, my GPS has SiRF GSC3e/LP, and you also have SiRF GSC3e/LP.

    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/M...RFDemo3.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/G...%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.
    http://WhatsAvailable.org will be closing down in Feb 2012 due to the OfficeLive.com shutdown on that date, it would have been nice to have some type of notification about it before now, but it will not be back up after that date.

+ Reply to Thread

Similar Threads

  1. Replies: 3
    Last Post: 04-21-2008, 01:26 PM
  2. String problem or data type problem ?
    By grasshopper in forum Propeller 1 Multicore Microcontroller
    Replies: 2
    Last Post: 11-02-2007, 04:29 AM
  3. Problem with the Pink. ( Software problem)
    By Joe in forum BASIC Stamp
    Replies: 12
    Last Post: 08-04-2007, 01:06 AM
  4. Replies: 7
    Last Post: 12-07-2006, 04:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts