Writing pins to the RS232

Roy Smith roy at panix.com
Fri Nov 25 16:43:00 EST 2005


In article <1132953944.656557.31910 at g14g2000cwa.googlegroups.com>,
 "jay.dow at gmail.com" <jay.dow at gmail.com> wrote:

> I want to write to the pins of an RS232 without using the serial
> protocol.  The use would be every pin could act to complete a circuit
> in customized hardware.  I could use python to communicate serially to
> a BASIC stamp or a Javelin stamp and then use the stamp to set however
> many pins as 0's or 1's but should it be that hard to do with python.
> I've looked through how python does serial with the "serial" module but
> it just uses Java's javax.comm libraries.  Is there anyway to do very
> low level device writing to COM ports?

This really isn't a Python question -- it's a low-level hardware question.  
The short answer, however, is that it's almost certainly impossible to 
anything like what you want, for a number of reasons.  The output pins on 
the connector are driven directly by some sort of serial hardware driver, 
and the hardware almost certainly doesn't expose an interface which lets 
you do what you're after.

I think want you want to be doing is looking at using a parallel port 
(commonly called a printer port on PC's).  But in any case, the answer to 
"How do I make the parallel port do this?" is a low-level hardware 
question, not a Python question.



More information about the Python-list mailing list