Reduce CPU time while using serialport?



Hi,

I am using Win32::serialport for reading a data through a scanner
which is connected to the serial port.
I use polling as below.But this consumes 99% of my CPU time. and
slows down the system.
while(!($data=~/\r/))
{
$data=$Scanner->input(); #read the scanner port
$labeldata=$labeldata.$data; #append
}

Is there any way I implement interrupts or events using perl. Or is
there any other method to solve this issue.
I use WIndows NT4(its old..but i have to...)

Pls share your ideas.

Cheers,
jis

.



Relevant Pages

  • Re: Reduce CPU time while polling serial port
    ... I am using Win32::serialport for reading a data through a scanner ... which is connected to the serial port. ... I use polling as below.But this consumes 99% of my CPU time. ...
    (comp.lang.perl.misc)
  • Re: Reduce CPU time while polling serial port
    ... I am using Win32::serialport for reading a data through a scanner ... which is connected to the serial port. ... I use polling as below.But this consumes 99% of my CPU time. ...
    (comp.lang.perl.misc)
  • Reduce CPU time while polling serial port
    ... I am using Win32::serialport for reading a data through a scanner ... which is connected to the serial port. ... I use polling as below.But this consumes 99% of my CPU time. ...
    (comp.lang.perl.misc)
  • Re: Reduce CPU time while polling serial port
    ... I am using Win32::serialport for reading a data through a scanner ... which is connected to the serial port. ... I use polling as below.But this consumes 99% of my CPU time. ...
    (comp.lang.perl.misc)
  • Re: HP h1945 with Socket in-hand Scanner
    ... > pocket PC, however on a normal PC there are basically 3 types of input. ... > when the serial port is activated and catches the input, ... > USB, which because of the standard microsoft HID drivers is really nothing ... > scanner and a program can catch the data. ...
    (microsoft.public.pocketpc.developer)