Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C Language question

Posted on 1997-06-27
2
Medium Priority
?
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
emmons earned 340 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

610 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