Shop OBEX P1 Docs P2 Docs Learn Events
BS2 Serin and Serout on same stamp — Parallax Forums

BS2 Serin and Serout on same stamp

Jeff_5_Jeff_5_ Posts: 36
edited 2011-09-25 20:31 in BASIC Stamp
Im have a 433Mhz RF receiver and transmitter. I also have on BS2 homework board. Is it possible to Serial out data from one I/O pin to the transmitter and then serial in the same data through different I/O pin from the receiver? I want to check my wireless connection and make sure its transmitting data.

Like this maybe

Serout 1,188,[Datasent]
then
Serin 2,188,[Datarecieved]
debug Datarecived

Like i said i just want to output data to my transmitter then read in back in from my receiver to check my wireless circuit.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-25 17:45
    You can send serial data out one pin and receive serial data in another pin. That's how it's usually done. It won't work for your situation because you can't do both things at the same time. When your BS2 is sending the data, it can't receive and when the BS2 is receiving data, it can't transmit. There's no buffering anywhere in what you have. You can buy an external receive buffer from Protean Logic that would buffer the received information until your program could read from the buffer.
  • Jeff_5_Jeff_5_ Posts: 36
    edited 2011-09-25 20:09
    Ahhh i didnt think about that. I do have a propeller home work board as well but i am not familiar with the language to program it. Could i write a simple serout program on the propeller and use it for the transmitter and use my basic stamp for the receiver? This should work right?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-25 20:31
    Look at the BS2 Functions object in the Propeller Object Exchange. I think it's included with the Propeller Tool. There are methods (subroutines) for many of the BS2 statements including the SEROUT statement. Have a look at the comments in the source code as well as the included demo (test) program.
Sign In or Register to comment.