433MHz RF Modules and USB2SER - HELP!
Christian
Posts: 10
I am trying to use a USB2SER connected to a 27981 reciever and 27980 transmitter to talk to a BOE that is also equipped with a 27981 and 27890. I can't seem to make it work and I'm not sure how the Tx/RX modules wouldn't be confused anyway (i.e.·a transmission from the·USB2SER transmitter might be recieved by both the USB2SER and BOE recievers).
My configuration is as follows:
1. BOE Vdd connected to 5V inputs of all transmitters and receivers
2. BOE Vss connected to GND on all transmitters and receivers
3. BOE pin 0 connected to reciever A
4. BOE pin 1 connected to transmitter A
5. USB2SER RX connected to reciever B
6. USB2SER TX connected to transmitter B
These are all direct connects and there are no other wires or equipment wired in.
I programmed the BS2 with the following code:
x VAR Word
y VAR Word
DO
·· PULSOUT 1, 1200
·· SEROUT 1, 16468, [noparse][[/noparse]"!", x.HIGHBYTE, x.LOWBYTE, y. HIGHBYTE, y.LOWBYTE]
·· x=x+1
·· y=y+1
·· DEBUG ? x
·· PAUSE 10
LOOP
I then used the StampDAQ program connected to COM 4 (USB2SER) to attempt to recieve data. I notice in the debug window that I see x=1 and then nothing else. Also the StampDAQ shows no input. Am I doing something wrong?
My end goal is to send a signal from the PC, recieve it with the BOE, then transmit a response, and finally recieve that response on the PC and display the value. Can anyone help with this?
My configuration is as follows:
1. BOE Vdd connected to 5V inputs of all transmitters and receivers
2. BOE Vss connected to GND on all transmitters and receivers
3. BOE pin 0 connected to reciever A
4. BOE pin 1 connected to transmitter A
5. USB2SER RX connected to reciever B
6. USB2SER TX connected to transmitter B
These are all direct connects and there are no other wires or equipment wired in.
I programmed the BS2 with the following code:
x VAR Word
y VAR Word
DO
·· PULSOUT 1, 1200
·· SEROUT 1, 16468, [noparse][[/noparse]"!", x.HIGHBYTE, x.LOWBYTE, y. HIGHBYTE, y.LOWBYTE]
·· x=x+1
·· y=y+1
·· DEBUG ? x
·· PAUSE 10
LOOP
I then used the StampDAQ program connected to COM 4 (USB2SER) to attempt to recieve data. I notice in the debug window that I see x=1 and then nothing else. Also the StampDAQ shows no input. Am I doing something wrong?
My end goal is to send a signal from the PC, recieve it with the BOE, then transmit a response, and finally recieve that response on the PC and display the value. Can anyone help with this?
Comments
·· Perhaps you should confirm that you are continually receiving data outside of StampDAQ, perhas using the Stamp Editor DEBUG Window.· That would be a good place to start.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
if (serialPort1.IsOpen)
{
textBox2.Text = serialPort1.ReadExisting();
}
I saw the following output in the recieve text box: [noparse][[/noparse][noparse][[/noparse]???[noparse][[/noparse]?
It only showed up after pressing the reset button on the basic stamp, so I think I am getting a signal. I'm just not sure what the signal means. After continual recieves, I get no response unless I reset the basic stamp. Each time I reset, I get another response. The basic stamp program is as follows:
'{$STAMP BS2}
'{$PBASIC 2.0}
'{$PORT COM1}
x VAR Word
y VAR Word
DO
· PULSOUT 1, 1200
· SEROUT 1, 16468, [noparse][[/noparse]"!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
· x=x+1
· y=y+1
· PAUSE 10
· DEBUG· ? x
LOOP
It almost seems like it doesn't get the DO loop.
Sending the string "!1234" from Com4
'{$STAMP BS2}
'{$PBASIC 2.5}
'{$PORT COM1}
x VAR Word
y VAR Word
PAUSE 100
DO
SERIN 2, 16468, [noparse][[/noparse]WAIT("8"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
DEBUG ? x
DEBUG ? y
LOOP
I loaded the following into the basic stamp:
'{$STAMP BS2}
'{$PBASIC 2.5}
'{$PORT COM1}
x VAR Byte
DO
SERIN 2, 16468, [noparse][[/noparse]x]
DEBUG ASC ? x
LOOP
I then opened hyperterm and typed 1. The debug screen shows the following:
x="E" where·E is a character that I cannot type into this message box.
Typing 2 returns the same character as 1. Typing 3 returns just ". Typing lower case a returns the same as 1 and 2.
Any ideas as to what is going on?