![Kontron PCI-AOB16/12 User Manual Download Page 64](http://html1.mh-extra.com/html/kontron/pci-aob16-12/pci-aob16-12_user-manual_1996534064.webp)
8254 Driver 6-9
PCI-AOB8/12 (16/12) User’s Guide
82
45 Co
unte
r/
Tim
er
ä
ä
ä
ä
8254 Driver
A simple driver is provided to perform basic counter/timer operations on the cards. Source code
for the driver and a sample program showing how to use the functions is in the DOS\CSAMPLES
directory. The following functions are provided.
ä
ä
ä
ä
Frequency Measure
The Frequency Measure function of the 8254 Counter Driver has the ability to measure an
unknown frequency from 1KHz to 2MHz. This function requires as input the Base Address of the
card. The unknown frequency is applied to the CLOCK IN pin of the card. The function will return
the frequency as a long integer in Hz.
long frequency_measure(unsigned BaseAddress);
ä
ä
ä
ä
Event Counter
The Event Counter function has the ability to trace the number of events that have occurred. This
function accepts as input the Base Address of the card, as well as an additional parameter. The
additional parameter identifies which features should be implemented on this call to the
function. Each feature can be identified by its unique integer value. Multiple features can be run
in a single call to the function by OR ing the respective integer values together. Features will be
executed in increasing integer order. The CLOCK IN pin of the card is the point of application for
the incoming events. (Note: This function is limited by the input speed of the 8254 counter, and
slow signals are preferred. Further, only 65,535 events are possible without a RESET.) The
function returns the number of events (based on priority) or 0 for those features that do not
specify a return value.
Features:
Initialize
= 1;initialize the counter
Start
= 2;begin counting
Sincestart = 4;return the number of events since the start
Sincelast = 8;return the number of events since last check
Stop
= 16; stop counting events
Reset
= 32; reset number of events to 0
unsigned event_counter(unsigned BaseAddress, int feature);
Summary of Contents for PCI-AOB16/12
Page 1: ...www kontron com PCI AOB8 12 16 12 User s Guide Manual PN 00650 151 2A May 2002...
Page 6: ...vi PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 8: ...viii PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 10: ...x PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 14: ...xiv PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 16: ...xvi PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 22: ...xxii PCI AOB8 12 16 12 User s Guide This page intentionally left blank...
Page 46: ...Chapter 4 Address Selection...
Page 66: ...Chapter 7 Software...
Page 68: ...Chapter 8 Calibration...