Home All Groups Group Topic Archive Search About

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

Author
8 Nov 2007 2:15 PM
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

Author
8 Nov 2007 6:40 PM
Dick Grier
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.
Author
8 Nov 2007 8:13 PM
Bandu
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.

Show quote
On 8 Nov, 18:40, "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote:
> 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.
> Seewww.hardandsoftware.netfor details and contact information.
Author
9 Nov 2007 7:30 PM
Dick Grier
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.
Author
9 Nov 2007 7:36 PM
Dick Grier
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.

AddThis Social Bookmark Button