Solved

C Language question

Posted on 1997-06-27
2
182 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:ghausheer
2 Comments
 
LVL 4

Accepted Solution

by:
emmons earned 170 total points
ID: 1251779
Talking directly to the 8253 should give you the resolution you crave. Check out this web site for some samples and instructions on dealing directly with the timer -
http://www.strangecreations.com/strange/library/hardware/pit.txt
0
 
LVL 10

Expert Comment

by:rbr
ID: 1251780
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.



0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now