[comp.sys.ibm.pc] Interrupt Info Needed

sac90286@uxa.cso.uiuc.edu (02/26/89)

Can any of you kind netlanders recommend a good source of info on the PC
timers and interrupt controller? I need to perform some real-time data 
collection using an AT clone, and need the data points to be collected at
precisely-spaced intervals. I am attempting to generate some code to
	1) program the on-board timer chip to count down at a specified
frequency, and once it has counted down to generate an interrupt,
	2) write a handler to process this timer-generated interrupt which
initiates the data read sequence,
	3) write another handler to process the "data ready" interrupt which
is generated on the analog input board when the data is valid and ready to be
read by the computer, which is on IRQ7.

I have consulted Norton's Programmer's Reference to the IBM PC as well as the
AT Tech Ref. Manual, but both seem to gloss over the detailed specifics I need
in order to accomplish the things outlined above. 

Anyone know of a good, thorough, and very deatiled book on the subject which
doesn't cost $500? I'd also be quite happy to look at some source code, if
anyone would care to email me some (the board in question is the IBM DACA
board, if anyone's interested). Much obliged!

sac90286@uxa.cso.uiuc.edu

curci@stat.uucp (Ray Curci (scri)) (02/28/89)

In article <111700044@uxa.cso.uiuc.edu> sac90286@uxa.cso.uiuc.edu writes:
>	1) program the on-board timer chip to count down at a specified
>frequency, and once it has counted down to generate an interrupt,
>	2) write a handler to process this timer-generated interrupt which
>initiates the data read sequence,

The IBM AT has an Intel 8054 3 channel timer.  One channel is already used
for refreshing the DRAM which should be left alone.  Another channel is
used to maintain the software time under ms-dos (it is used to measure the
1/18.2 second ticks).  The remaining channel is used to generate a 
frequency to feed into the speaker to make sound.  IBM cleverly has an
AND gate where you can control one of the input in order to turn off the
sound and utilize the timer without making any noise.  If you are interested
I can mail you an excerpt from a Microsoft C program that programs this
chip.  It is probably possible to set up the chip to generate an interrupt
when it counts down, but I haven't tried it.  The definative source of info
on this timer is the data book from intel.  The latest data book I have that
describes it is "Intel Microprocessor and Peripheral Handbook Volume II -
Peripheral - 1987 #230843".  In the front cover is a price of $25 for the
two volume set and a toll free number for intel literature: 800-548-4725.

>	3) write another handler to process the "data ready" interrupt which
>is generated on the analog input board when the data is valid and ready to be
>read by the computer, which is on IRQ7.

I don't know which board you are using, but many data aquisition board 
contain timers for triggering purposes.  I have recently worked with the 
Metrabyte DASH-16, DAS-16, DAS-16F, DAS-8 which all have this capabililty.

>sac90286@uxa.cso.uiuc.edu
curci@stat.fsu.edu,  curci@nu.cs.fsu.edu