![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/8/02/8027bf7e-62fd-46a0-b966-887d52956259/8027bf7e-62fd-46a0-b966-887d52956259-bg19.png)
PCI30FG User Manual
Eagle Technology © Copyright 2002 18
Configuring a counter
A single call is necessary to configure a counter. An external clock must clock
the first three counters, but the internal 8MHz clock clocks the fourth counter.
API-CALL
Long EDRE_CTConfig(ulng Sn, ulng Ct, ulng Mode, ulng Type, ulng ClkSrc, ulng
GateSrc)
The serial number, counter-number, mode, type, clock source and gate
source is needed to specify a counter’s configuration. A return code will
indicate if any errors occurred.
ACTIVEX CALL
Long EDRECTX.Configure(long ct, long mode, long type, ulng source, ulng gate)
The counter-number, mode, type, clock source and gate source is needed to
specify a counter’s configuration. A return code will indicate if any errors
occurred.
Only the counter mode parameter is used by the PCI30FG. The table below
shows the options for each parameter.
Parameter Description
Sn Serial Number
Ct Counter Number:
0 : User Counter 0
1 : User Counter 1
2 : User Counter 2
3 : User Counter 3
Mode 8254 Counter Mode. See 8254 datasheet for details
Type Not Used
Source Not Used
Gate Not Used
Table 4-2 Counter Configuration
How to latch all counters
The 8254 counters support a function where all counters can be latched at the
same time. The PCI30FG driver supports this function through a query call to
the driver. This will only work on the first 3 user counters.
Example:
Unsigned long sn=1000000001
EDRE_Query(sn,CTLATCALL=302,0)