Options
RF Tx and Rx programming to transmit a character
Here is our code for the RFrx. It isgiving us funny outputs even in the absennse of any input:
RECEIVED VALUE is:ww
RECEIVED VALUE is:NN
RECEIVED VALUE is:
RECEIVED VALUE is:ww
RECEIVED VALUE is:NN
RECEIVED VALUE is:
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
We are using mode = 0 in the SERIN_CHAR function and that is inverted mode?!
We also tried replacing the start with the line you sent instead and it didnt work (the enter character line didn't even pop up like it used to?)
Still receiving funny characters?
we also tried the debug in function and are having the same problem?
any help is appreciated!
thanks
-the repeat can be taken out but i put it in to make sure it will get a signal.
' You may want to change DEBUG_BAUD depending on the Baud used by your PC program
' since the default value is 9600.
Note: You've taken the BS2 Compatibility Library and grafted on a small start routine
to make your program. That's not how the BS2 Compatibility Library is supposed to be
used. You're supposed to use it as an object without changes. Look at the demo program
that comes with the BS2 Compatibility Library. That's what you're supposed to modify to
make your own program
Note: The serial I/O routines in the BS2 Compatibility Library are not buffered just like
the Stamp itself. The Parallax Serial Terminal routines are buffered, but you don't need
that for testing purposes as long as you include the PAUSE in the transmit program. That
allows the receive program to display its message, then start the SERIN_CHAR routine again.
Without the PAUSE, the transmit program would send another character while the receive
program is displaying its message and it would miss the character being sent.
Have you tried what Mike has suggested? If so, what were the results?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
It does sounds like the modules are not using the proper baud rate; garbage characters are a key indicator that the baud rate should be reviewed. Can you post a screen shot of your PST giving the wierd characters?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
Rf receivers usually increase the gain in absence of RF input. That results in random TTL levels at their output. Those random bits/bytes can fill the buffer of the UART quickly. From the transmitting size send a continuous series of a character, like 'AAAAAAAAAAAAAAAAA...'. At the receiver size that will quiet the noise, and after having the correct baud rate, you should receive 'AAAAAAAAAA's. Then to get the signal out of the noise, send a synchronizing header like 'ITSME' before the message. That message is not likely to came out from the noise,· and the characters after it are probably correct, if your Rf has enough field strength. This method worked several times to get Rf link between BS2s, and now works between 2 Props.·
Istvan