is System.IO.Ports.SerialPort supported in 64bit?

  • Thread starter Thread starter Bandu
  • Start date Start date
B

Bandu

Hi,

is System.IO.Ports.SerialPort supported in 64bit?
I'm writing C# application and its worked fine with 32 bit.
But in 64-bit, System.IO.Ports.SerialPort never fire up the Event
Handler (e.g. PinChangedEvent ).

Please, Help?

Regards,
Bandu
 
I do not have a 64 bit computer, so I cannot verify any issues. However, I
have heard, 2nd hand, that there are some.

Can you simply poll, using a Timer event, instead of using the SerialPort
event handler?

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
OK. I can try.
But I'm trying to record the time using multithreading on the
performance of the serial attached device.

Its sad, isn't it? I thought in .net environment, 32 or 64 bit
wouldn't matter. But I was wrong.

Thanks Richard.
 
Threading DOES NOT (in general) provide any performance boost. The receive
process in the SerialPort object is threaded, by design. Thus, whether you
use OnComm or poll using a Timer, the resultant data throughput should be
(almost) exactly the same. Actually, if your code interacts with the UI,
polled code actually performs better, because you do not have to invoke a
delegate, which results in less processing in the polled mode.


--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
I meant DataReceived or PinChanged events. Realize that the PinChanged
event has some inherent latency from that actual hardware change that it
represents.... These events are not real-time.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top