SERIN echo
Sarten-X
Posts: 32
Is it correct or normal that, on a BS2px in a Super Carrier board, when sending data to be received by SERIN, I get the data I send echoed back to the sending device? At first I thought this was a cabling problem, but the stamp receives programming just fine. I'm using this program:
The rest of the code doesn't matter. As a further example:
Running this code brings up a pre-configured debug window. Entering "hi" in the top box results in "hhii" in the bottom. With the cable disconnected from the stamp, entering data in the top box doesn't display anything in the bottom.
Main: SEROUT 16, Baud, [noparse][[/noparse]"Command: ", CR] SERIN 16, Baud, [noparse][[/noparse]DEC InputData] ON InputData GOSUB Main, c_high, c_low, c_pause, c_pulsout, c_scsbr, c_sc GOTO Main
The rest of the code doesn't matter. As a further example:
Main: DEBUGIN B0 DEBUG B0 GOTO Main
Running this code brings up a pre-configured debug window. Entering "hi" in the top box results in "hhii" in the bottom. With the cable disconnected from the stamp, entering data in the top box doesn't display anything in the bottom.
Comments
This bothers me. I'm trying to send & receive data so the stamp can be controlled by a PC, and all the signals are being messed up. Also, when trying to receive data, all the command strings are returned along with the data I want, which means I'll have to parse out the useless stuff. Ugh.
Thanks, though.
All your PC application has to do is ignore everything it sends and there will be no problems…Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
www.kronosrobotics.com sells a nice module for about $8.00 I believe.
I have several BS1 serial adapters at my disposal. Would I be able to use one of those?
Wait, let me check...
Interesting.· If on the PC side you set DTR high (+5 to +10 volts), and RTS low (-5 to -10 volts) (these provide the +- 10 volts needed by the adapter) then it looks like you COULD use the BS1 serial adapter as a level shifter.
DTR high is the default for Hyperterminal.· I'm not so sure about RTS low, though.· You could do it programatically, of course.
Post Edited (allanlane5) : 3/27/2007 5:00:23 PM GMT
If anyone's interested, I'd be happy to send out the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support