julia_nosewater
03-03-2005, 09:37 PM
Hi!
I'm trying soooo hard to get RTS/CTS flow control working with pyserial (http://pyserial.sourceforge.net (http://pyserial.sourceforge.net/)).· Basically on my basic stamp 2 I've got:
...
SERIN 6\5, BAUDMODE, [DEC1 CODE]
...
And on my PC I've got:
import serial
s = serial.Serial(0, 9600, rtscts=1)
s.write("3")
The program just hangs once I call write.· The serial·driver is waiting for something to happen on the CTS or RTS or something.· I tried·zillions of different combinations of pins.· Also, if I set rtscts=0 then data is sent and received OK... so this means I·think I have the baudmode set properly.· But I really need the RTS/CTS handshake because I'm sending data one byte at a time from PC to BS2.
I tried putting a 10KOhm resistor in series (and I also tried in parallel) with the FPIN (pin 5 in my case), but that didn't work either.
This is the pin config I was using on the rs232 (Im only using 3 pins and no pins are looped):
PIN 5: Ground
PIN 3: Connects to P6 on the Basic Stamp 2
PIN 7 (also tried·8): Connects to P5 on the Basic Stamp 2
Does anybody have any suggestions?· Jeez I've been trying to get this to work for soooo long.
julia
I'm trying soooo hard to get RTS/CTS flow control working with pyserial (http://pyserial.sourceforge.net (http://pyserial.sourceforge.net/)).· Basically on my basic stamp 2 I've got:
...
SERIN 6\5, BAUDMODE, [DEC1 CODE]
...
And on my PC I've got:
import serial
s = serial.Serial(0, 9600, rtscts=1)
s.write("3")
The program just hangs once I call write.· The serial·driver is waiting for something to happen on the CTS or RTS or something.· I tried·zillions of different combinations of pins.· Also, if I set rtscts=0 then data is sent and received OK... so this means I·think I have the baudmode set properly.· But I really need the RTS/CTS handshake because I'm sending data one byte at a time from PC to BS2.
I tried putting a 10KOhm resistor in series (and I also tried in parallel) with the FPIN (pin 5 in my case), but that didn't work either.
This is the pin config I was using on the rs232 (Im only using 3 pins and no pins are looped):
PIN 5: Ground
PIN 3: Connects to P6 on the Basic Stamp 2
PIN 7 (also tried·8): Connects to P5 on the Basic Stamp 2
Does anybody have any suggestions?· Jeez I've been trying to get this to work for soooo long.
julia