q*****z 发帖数: 191 | 1 Hi
I am a newbie in C# and somehow have to develop a software that communicates
with an external device that has a RS232 interface.
I have some experiences with RS232 programming but none of them involves
handshacking.
The parameters of this device is as follows:
baudrate: 1200
parity: odd
data bits: 7
stop bits: 1
handshacking: Xon/Xoff
If I use the hyperterminal in windows, it responds ok. But I cannot get the
C# program to work.
Here is the part of the settings in the program:
SerialPort Bala |
c**t 发帖数: 2744 | 2 did you check if the serialport had been initialized?
communicates
【在 q*****z 的大作中提到】 : Hi : I am a newbie in C# and somehow have to develop a software that communicates : with an external device that has a RS232 interface. : I have some experiences with RS232 programming but none of them involves : handshacking. : The parameters of this device is as follows: : baudrate: 1200 : parity: odd : data bits: 7 : stop bits: 1
|
q*****z 发帖数: 191 | 3 Yeah, I used a try...catch structure in the port openning procedure. It
should be openned properly, otherwise it should complain. Is it what you are
asking?
In addition to that, the program communicate ok with other devices that does
not require handshack...
Thanks. |