python - Can I use a parallel port for RS-232 on linux? -


the rs232 (db9) ports on machine full, write lcd scoreboard using parallel port. making cable correct pinout not problem. need interface device using python.

here like: api similar pyserial, can set baud rate, , send string scoreboard. scoreboard has no requirements handshake or stop-bit, , supposed auto-detect. need write device, there no need read port.

i aware of pyparallel, has used similar application? appears designed parallel (lpt) protocol. scoreboard support rs232, rs422, rs485, or 20ma current loop. have done fair bit of programming rs232 devices, technical knowledge of serial communications if limited. appreciated.

http://pythonic-wisdom.blogspot.com/2008/11/accessing-parallel-port-on-linux-from.html

in short, yes can, there limits on achievable baudrate, maximum via inb/outb, usable through python gpio module, around 300,000 operations second, @ 300kbaud if write port. using linux /dev/parport @ least twice slower.

if need 9600 baud example, quite possible achieve reliable transmission, although have prepared transmission or reception being interrupted linux scheduling or python gc.

another issue voltage levels, need -10 , +10 vdc or rs-232, , can't negative voltage parallel port, you'll have add hardware that.

perhaps might or might not able fake rs422/rs485 differential signalling setting pair of pins (high, low) , (low, high) in turns.

cannot tell current loop in practice. that's https://electronics.stackexchange.com/


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -