pySerial: write in a blocking mode

Grant Edwards grante at visi.com
Wed Mar 29 10:08:23 EST 2006


On 2006-03-29, Peter Hansen <peter at engcorp.com> wrote:

>>>This seems a little odd to me.  We've used several RS232-RS485
>>>converters without needing to do that.  Maybe a more sophisticated
>>>device would eliminate this need?
>> 
>> Yes. The device is very simple (I made it).
>
> Perhaps a very simple change to it would make it as convenient as the 
> commercial products.  I vaguely recall (not having checked for over a 
> decade) that all they do is set the outgoing DTR line whenever there is 
> data being transmitted by the PC, by using something like a 555 timer 
> with a very short delay (effectively watching the start bit and any zero 
> bits that are transmitted).  There are probably even example circuits 
> based on this or better approaches available on the net.

That approach works pretty well as long as you can tolerate an
extra byte-time delay after the last stop bit before DTR or RTS
or whatever changes state.

-- 
Grant Edwards                   grante             Yow!  If this is the DATING
                                  at               GAME I want to know your
                               visi.com            FAVORITE PLANET! Do I get
                                                   th' MICROWAVE MOPED?



More information about the Python-list mailing list