7 event counter, Signal connection and applications • 37, Figure 24: example of event counter – ADLINK PCI-8554 User Manual
Page 47
Signal Connection and Applications • 37
4.7 Event
Counter
This example counts how many external events in 1 second
Step 1:
This application requires one counter to generate a
time base of 1 second and the second counter to
count the event. Cascaded counters 11and 12 are
used as a watchdog timer. Counter 1 is used in this
example to count the external events. The clock
source of counter 1 is the event signal so the
frequency is not fixed.
Step 2:
Connect ECLK1 to the signal to be measured and
adjust JP1 to enable the debounce function.
Step 4:
The gate source of counter 1 is always enabled, so
the external gate is open.
Step 5:
Write the control program. Refer to‘DEMO5.C’
source code.
COUT1
Counter #1
8254 Chip #1
C
G
O
'H'
COUT12
Counter #12
8254 Chip #4
C
G
O
ECK1
GND
CK1
COUT10
debounce
system
DB_CLK
JP1
2MHz
COUT11
selectable by function
"_8554_SET_DBCLK"
ECLK1
( Event Signal )
selectable by
function
Counter #11
8254 Chip #4
C
G
O
'H'
'H'
8MHz
Figure 24: Example of event counter