Shop OBEX P1 Docs P2 Docs Learn Events
Need help with wireless transmission of data using BS2 — Parallax Forums

Need help with wireless transmission of data using BS2

ShriShri Posts: 4
edited 2008-11-24 20:28 in BASIC Stamp
Hi,
·· I'm working on a school project where I need to transmit a number or a word wirelessly. I'm using two BS2 boards along with RX433 transmitter and receiver.

··I have tried running the sample codes from the websites "SERIN_SEROUT1.bs2" for transmitter·and "SERIN_SEROUT1.bs2" for receiver which basically transmit a sample word "Hello!" and receive it. But at the debug screen, I just see "ppppppp pppp " and so on instead of HELLO!

· Similarly I used some another code to transmit a number and receive it, I just saw repeated 254 number again and again.

Can someone advise me of what could the actual problem be and suggest a solution!

Any help will be greatly appreciated.

Thank you,

Sriharsha M

[noparse][[/noparse]NOTE: Attachment shows a screenshot of debug screen]
640 x 430 - 39K

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2008-11-20 20:38
    Your screen shot makes me think there's a mismatch in either baud rate or 7-bit versus 8-bit.

    Are the sample programs written for your particular stamp model? If not, you'll have to adjust the baudmode as per the table in the help file for SERIN/SEROUT.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • ShriShri Posts: 4
    edited 2008-11-21 15:33
    I have attached the codes that I used for wireless transmission.

    I have checked the baud rate and I think it matches. But I didn't know·how to check the 7bit/8 bit thing.

    Could you please check into the·code and let me know if you find anything wrong.


    Thanks a lot ,

    Shri
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-21 15:58
    Shri -

    The baud rate is fine, but I rather doubt the BS-2 can sustain a baud rate of 38.4K. According to the PBASIC Help File the limit is a baud rate of 19.2K, due to the use of flow control. Reduce the baud rate and your programs should work.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • ShriShri Posts: 4
    edited 2008-11-23 20:46
    Thanks Bruce and Tom.

    I have changed the baud mode, but still find the same problem to repeat. This time I saw lot of special characters on the debug screen.
    I changed the baud to 9600 from 38.4k.

    I'm wondering if I made any mistake with the following:

    1) Data pin connected to pin 1 and pin 0 for transmitter and receiver resp. (also tried with pin 8 and pin 7).
    2) I'm using USB --> RS232 --> BS2. Has it anything to do with "32" or "19416" as baud rate.

    Appreciate your help so far!

    Thanks,
    Shri
  • awesomeduckawesomeduck Posts: 87
    edited 2008-11-23 21:10
    Classic sympton of a baud rate mismatch. As Bruce stated, looking at the SERIN command in the manual you definitely need to slow down to 19.2 if you use flow control.

    Which brings me to a question...What exactly are you wiring the flow control pin to? I didn't think 433Mhz modules supported flow control...at least not the one sold by Parallax.

    Even if you find a 433Mhz XCVR set that supports flow control, that will likely be for the flow between the BS and the module...its extremely unlikely there is flow control over the air, since that would require full duplex communication over the air. Does anyone know if there is a FIFO on the Parallax 433MHz receiver?
  • ShriShri Posts: 4
    edited 2008-11-23 21:22
    OMG !! I guess thats one problem then.
    I dont have the flow control pin connected to anything and I dont think the one I bought supports it either.

    I have'nt dealt with BASIC programming before. All I need is a simple code to transmit one particular number and receive it wirelessly!

    Can anyone help me with this small portion of code!

    Thanks,
    Shri
  • stamptrolstamptrol Posts: 1,731
    edited 2008-11-24 20:28
    OK, no flow control is needed or even applicable.

    For the amount of data you're transferring, you don't need any speed to speak of. For reliability with a BS2 as a receiver, stay at 4800 and below.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.