Solved

C Language question

Posted on 1997-06-27
2
190 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL handling single and double quotes 3 108
Want to delete all my personal data 13 156
Acrinis True image 2 118
Test the speeds on my PC Drives 12 80
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…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

734 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