muncherelli
muncherelli

Reputation: 2903

Access Serial Port VIA USB

I want to access a scale hooked up via a RS232 Serial Port. The machine I'm writing the C# code on does not have a serial port, so I was going to use a USB to Serial Port dongle. Will anything need to be changed with my code?

Upvotes: 0

Views: 487

Answers (1)

Hans Passant
Hans Passant

Reputation: 941465

No, they emulate a serial port at the driver level. Your code, nor the SerialPort class, won't know the difference. The only temptation you'll have to resist is unplugging the USB cable while the port is opened. That works about as well as unplugging a flash memory stick while Windows is writing to it. Your customer will do it anyway, but they usually get bored with it after a couple of times.

Upvotes: 4

Related Questions