Com3 overhead (again)

Started by cfrancois_55116 July 1, 2006
After reading about Com3 overhead on one of the boards, I decided to
measure it to determine if opening Com3 only when needed would be
beneficial for my application. My tests use 19200 baud and a single
task, and measure the time for a computational sequence for the
following scenerios:

Time Speed Factor
-------- ------------
Com3 open w/input pin: 2.042969 1.000
Com3 open w/dummy input pin: 1.535156 1.331
Com3 not open: 0.921875 2.216
Com3 dynamic OpenCom/CloseCom w/dummy pin: 0.921875 2.216

It appears that closing Com3 eliminates all of the interrupt
overhead as if Com3 was never opened at all.

I measured the speed of using OpenCom+CloseCom and the average was
1.221ms with low variance. When using the a dynamic technique, it
is important to ensure that the queues are flushed before closing
the port. Flush code is available in the files section of this group.

IMO, NetMedia should mention this overhead in their Com3
documentation. Most people are not going to expect their application
to slow down by 50% because they have Com3 open. It may even save some
defections to other platforms.