Serial RF Data Problem
Archiver
Posts: 46,084
I'm trying to build an RF remote control link for a robot, but have run into
some kind of data encoding or translation problems with the link.
The system is intended to be pretty simple. I'll send movement commands (i.e.
"F" for forward, etc.) from the laptop to the robot BS2 controller. Since I'm
new to this, I started by building a very basic BS2 <-> PC serial communication
using a MAX232 interface and Hyperterminal before tackling the RF link.
I've successfully had communication between my BS2 and a laptop through the
MAX232. Once I had that working, I "split the circuit" and inserted a Linx
RXM/TXM-433 pair to send characters to the BS2 via RF. On the laptop side, I
send the TTL/CMOS compatible TX signal from the MAX232 to the transmitter. On
the BS2 side, I run the TTL/CMOS output from the receiver directly to pin 0. I
kept a hardwired connection from the BS2 pin 1 to the laptop (via the MAX232)
for debugging.
In a nutshell, although the RF link can reliably send characters, the BS2 is
interpreting them as something different. For example, sending an "f" results
in a "D" on the BS2. Oddly, some transmitted characters are interpreted as the
same character on the BS2 side (i.e. both "9" and "8" are received as "@").
I started fiddling around with different baudmode settings on the serin command,
but was hoping someone could point me in a particular direction. I don't mind
doing the work; just looking for a direction.
BTW, here's the BS2 code I'm running to test this link ...
output 15
high 15
baud_REC con 84
baud_TXT con 84
pin_in con 0
pin_out con 1
letter var byte
letterout:
serin pin_in, baud_REC, [noparse][[/noparse]letter]
serout pin_out, baud_TXT, [noparse][[/noparse]"Letter is ", letter, CR]
if letter = "A" then lamp
goto letterout
lamp:
low 15 'Pulse an LED if the letter "A" is received
pause 2000
return
[noparse][[/noparse]Non-text portions of this message have been removed]
some kind of data encoding or translation problems with the link.
The system is intended to be pretty simple. I'll send movement commands (i.e.
"F" for forward, etc.) from the laptop to the robot BS2 controller. Since I'm
new to this, I started by building a very basic BS2 <-> PC serial communication
using a MAX232 interface and Hyperterminal before tackling the RF link.
I've successfully had communication between my BS2 and a laptop through the
MAX232. Once I had that working, I "split the circuit" and inserted a Linx
RXM/TXM-433 pair to send characters to the BS2 via RF. On the laptop side, I
send the TTL/CMOS compatible TX signal from the MAX232 to the transmitter. On
the BS2 side, I run the TTL/CMOS output from the receiver directly to pin 0. I
kept a hardwired connection from the BS2 pin 1 to the laptop (via the MAX232)
for debugging.
In a nutshell, although the RF link can reliably send characters, the BS2 is
interpreting them as something different. For example, sending an "f" results
in a "D" on the BS2. Oddly, some transmitted characters are interpreted as the
same character on the BS2 side (i.e. both "9" and "8" are received as "@").
I started fiddling around with different baudmode settings on the serin command,
but was hoping someone could point me in a particular direction. I don't mind
doing the work; just looking for a direction.
BTW, here's the BS2 code I'm running to test this link ...
output 15
high 15
baud_REC con 84
baud_TXT con 84
pin_in con 0
pin_out con 1
letter var byte
letterout:
serin pin_in, baud_REC, [noparse][[/noparse]letter]
serout pin_out, baud_TXT, [noparse][[/noparse]"Letter is ", letter, CR]
if letter = "A" then lamp
goto letterout
lamp:
low 15 'Pulse an LED if the letter "A" is received
pause 2000
return
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
I'm not familiar with the Linx RF modules, but I would definitely
start off at a slower baud. I noticed you have the Stamp configured
for 9600 bps. Look up the Linx specs and check to see how low you can
go on the serial interface. Once you get it working at the slowest
baud possible, then slowly build up to faster bauds.
I'm also working on a RF remote control for my Boe-Bot, but I'm going
to be using the Parallax RF transmitters and receivers. Instead of
the PC, I'm going to use a graphical LCD display.
Good luck with your remote,
Ed
--- In basicstamps@yahoogroups.com, "Joe McCartin" <joe@j...> wrote:
> I'm trying to build an RF remote control link for a robot, but have
run into some kind of data encoding or translation problems with the
link.
>
> The system is intended to be pretty simple. I'll send movement
commands (i.e. "F" for forward, etc.) from the laptop to the robot
BS2 controller. Since I'm new to this, I started by building a very
basic BS2 <-> PC serial communication using a MAX232 interface and
Hyperterminal before tackling the RF link.
>
> I've successfully had communication between my BS2 and a laptop
through the MAX232. Once I had that working, I "split the circuit"
and inserted a Linx RXM/TXM-433 pair to send characters to the BS2
via RF. On the laptop side, I send the TTL/CMOS compatible TX signal
from the MAX232 to the transmitter. On the BS2 side, I run the
TTL/CMOS output from the receiver directly to pin 0. I kept a
hardwired connection from the BS2 pin 1 to the laptop (via the
MAX232) for debugging.
>
> In a nutshell, although the RF link can reliably send characters,
the BS2 is interpreting them as something different. For example,
sending an "f" results in a "D" on the BS2. Oddly, some transmitted
characters are interpreted as the same character on the BS2 side
(i.e. both "9" and "8" are received as "@").
>
> I started fiddling around with different baudmode settings on the
serin command, but was hoping someone could point me in a particular
direction. I don't mind doing the work; just looking for a direction.
>
> BTW, here's the BS2 code I'm running to test this link ...
>
> output 15
> high 15
> baud_REC con 84
> baud_TXT con 84
> pin_in con 0
> pin_out con 1
> letter var byte
>
> letterout:
> serin pin_in, baud_REC, [noparse][[/noparse]letter]
> serout pin_out, baud_TXT, [noparse][[/noparse]"Letter is ", letter, CR]
> if letter = "A" then lamp
> goto letterout
>
> lamp:
> low 15 'Pulse an LED if the letter "A" is received
> pause 2000
> return
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
It was that simple. Dropping the baud rate to 1200 cleared everything up!
Thanks,
Joe
Original Message
From: "amulet_ed" <edsandoval@h...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, May 12, 2003 11:43 AM
Subject: [noparse][[/noparse]basicstamps] Re: Serial RF Data Problem
> Joe,
>
> I'm not familiar with the Linx RF modules, but I would definitely
> start off at a slower baud. I noticed you have the Stamp configured
> for 9600 bps. Look up the Linx specs and check to see how low you can
> go on the serial interface. Once you get it working at the slowest
> baud possible, then slowly build up to faster bauds.
>
> I'm also working on a RF remote control for my Boe-Bot, but I'm going
> to be using the Parallax RF transmitters and receivers. Instead of
> the PC, I'm going to use a graphical LCD display.
>
> Good luck with your remote,
>
> Ed
>
>
> --- In basicstamps@yahoogroups.com, "Joe McCartin" <joe@j...> wrote:
> > I'm trying to build an RF remote control link for a robot, but have
> run into some kind of data encoding or translation problems with the
> link.
> >
> > The system is intended to be pretty simple. I'll send movement
> commands (i.e. "F" for forward, etc.) from the laptop to the robot
> BS2 controller. Since I'm new to this, I started by building a very
> basic BS2 <-> PC serial communication using a MAX232 interface and
> Hyperterminal before tackling the RF link.
> >
> > I've successfully had communication between my BS2 and a laptop
> through the MAX232. Once I had that working, I "split the circuit"
> and inserted a Linx RXM/TXM-433 pair to send characters to the BS2
> via RF. On the laptop side, I send the TTL/CMOS compatible TX signal
> from the MAX232 to the transmitter. On the BS2 side, I run the
> TTL/CMOS output from the receiver directly to pin 0. I kept a
> hardwired connection from the BS2 pin 1 to the laptop (via the
> MAX232) for debugging.
> >
> > In a nutshell, although the RF link can reliably send characters,
> the BS2 is interpreting them as something different. For example,
> sending an "f" results in a "D" on the BS2. Oddly, some transmitted
> characters are interpreted as the same character on the BS2 side
> (i.e. both "9" and "8" are received as "@").
> >
> > I started fiddling around with different baudmode settings on the
> serin command, but was hoping someone could point me in a particular
> direction. I don't mind doing the work; just looking for a direction.
> >
> > BTW, here's the BS2 code I'm running to test this link ...
> >
> > output 15
> > high 15
> > baud_REC con 84
> > baud_TXT con 84
> > pin_in con 0
> > pin_out con 1
> > letter var byte
> >
> > letterout:
> > serin pin_in, baud_REC, [noparse][[/noparse]letter]
> > serout pin_out, baud_TXT, [noparse][[/noparse]"Letter is ", letter, CR]
> > if letter = "A" then lamp
> > goto letterout
> >
> > lamp:
> > low 15 'Pulse an LED if the letter "A" is received
> > pause 2000
> > return
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>