BS2 Communication Problem
paul1985
Posts: 8
I'm working with a BS2 and I've successfully used the basic stamp editor to write a program via RS-232.· I've even tested my program using the debug feature in the editor, and everything works fine.· My problem is that the stamp doesn't like any signals sent via another programs by rs232 (by "doesn't like", I mean nothing happens at all).· I've used hyper terminal and LabView.· I've even looked at the pulses I'm sending to the BS2 on an oscilloscope.· They are the exact same pulses that I see when I'm in the editor using the debug option.· Same voltage levels and everything.· Any ideas what could be wrong?· Would it be helpful if I showed you all·the simple program I made?· Isn't the debug mode essentially hyper terminal?
Thanks,
Paul
Thanks,
Paul
Comments
-Phil
On the BS2, if you hold DTS high, the BS2 stays in reset.
The BOE board has a couple of capacitors to de-couple this reset, so that no matter HOW long Hyperterminal holds it high, the BS2 only gets one reset and can then run. I'm assuming you're not using a BOE board, because this symptom is so typical of that situation.
You COULD disconnect the DTS line in your serial cable, that's another way around this problem.
Edit:· D'oh!· Yes, the "DTR" signal, not "DTS".· Sorry about that.
Post Edited (allanlane5) : 3/23/2007 2:14:35 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
SerData VAR Byte
Loop:
SERIN 16, 16780, [noparse][[/noparse]WAIT ("a"),DEC SerData]
IF SerData = 1 THEN Sub
IF SerData = 2 THEN DoThis
GOTO Loop
Sub:
HIGH 8
GOTO Loop
DoThis:
LOW 8
GOTO Loop
I will give you all an update after I look into the possible resetting issue. Thanks again.
- Paul
SerData VAR Byte
main:
SERIN 16, 16780, [noparse][[/noparse]WAIT ("a"),DEC SerData]
IF SerData = 1 THEN GOSUB Sub
IF SerData = 2 THEN GOSUB DoThis
GOTO main
Sub:
HIGH 8
RETURN
DoThis:
LOW 8
RETURN
After you have modified the DTR on your serial cable and connect to hyperterminal set flow control to none in the hyperteminal connect dialog box.
Jeff T.
- Paul
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I guess that is another good lesson learnt,for me anyway,·to keep up with the latest software it gives you more commands and widens your control options.
Jeff T.