At 12:05 +0000 02/05/2004, Nuno Lambu�a wrote:
>Hi, in LV7 I need a timers smaller than 1ms. My need is for implementing a
>serial protocol. Using the parallel port I get a too fast dataflow, so I
>need delays.
Nuno,
You can't do this using a normal desktop O/S.  Period.

You can't use the parallel port for a serial protocol.  It could be a byte-parallel, 
serial protocol such as GPIB is but that can't be implemented on a standard serial or 
parallel port.

There are two ways you can go about this kind of problem.  One is to do handshaking so 
that the data flow is the correct speed for your device.  This is the correct way.  
Any device that cannot handle an infinite amount of data at full baud rate should 
implement handshaking.  Standard handshaking protocols for serial ports are
xon/xoff characters embedded in data stream
dtr/dsr  these are two hardware handshaking and a bit more reliable for high speed 
transfers.
rts/cts

If you really need sub millisecond timing for some lines or for characters going in 
and out of a port then you should use a timer/counter output gating an external serial 
port.

Otherwise you should look at the RT OS and or a FPGA solution which can have exact 
sub-millisecond timing in software.  But these are expensive routes.

-Scott


Reply via email to