
December 2nd, 2012, 01:31 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 1
Time spent in forums: 55 m 27 sec
Reputation Power: 0
|
|
|
Newbie. Serial Data & COM Ports.
I want to monitor serial ASCI data arriving at a USB port via a RS232 to USB converter.
A number years ago I wrote a QBasic program on a PC with a genuine serial port to perform a similar task and used a command to prepare the port setting baud rate, data bits and timeouts etc
OPEN "com1:9600,N,8,1,cd0,cs0,ds0,op0,rs,tb512,rb512" FOR RANDOM AS #2
and the following would identify the arrival of data at the port and start the decoding subroutine.
ON COM(1) GOSUB READRX
I would like to create a similar program using Python but have not yet been able to find information regarding establishing the coms with external devices. As my pc does not have a 'genuine' serial port the solution must be able to work through the USB port and the RS232 converter.
Using Python on a Windows XP PC
Any help much appeciated.
|