Link to home
Start Free TrialLog in
Avatar of ghausheer
ghausheer

asked on

C Language question

I am trying to read data from the parallel port at precise intervals (The fastest needed interval is 43 microseconds)
There are also a few steps which need to be done after reading the data.  To do this I beleive I need a very accurate timer, and the standard timer on the PC is only accurate to 54 miliseconds.  We have tried reading data from the 8253 external timer, but have not had much luck with this.  Does anyone have any ideas?
ASKER CERTIFIED SOLUTION
Avatar of emmons
emmons

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rbr
rbr

If you use an AT you can use Function 83h of Interrupt 15h.
This function sets a flag at Bit number 7 after a period of time.
AH:= 83h
ES:= Segment Adress of the flag.
BX:= Offset Adress of the flag.
CX:= High Word of Microseconds you want
DX:= Low Word of Microseconds you want.

Or if you want to wait for some microseconds use function 86h of the same interrupt.
AH:=86h
CX:= High word of microseconds to wait for.
DX:= Low Word of microseconds to wait for.