Datasheet

Function Counter/Timer
Function equivalent to Intel 82C54
The module Counter/Timer can be used as a programmable interval coun-
ter/timer (similar to Intel 82C54) with 3 x 32-bit per module.
It generates time delays through software control. Instead of setting up
timing loops in software, the user programs the module for the desired
delays. After this delay, the module will interrupt the PC.
Optical isolation of the inputs and outputs through opto-couplers to
prevent ground loops
3 x 32-bit counters/timers, binary counting only
6 programmable modes
Status readback and latch command
Inputs and outputs can be inverted through software
Hardware and software gate possible, readable
Simple interface: no multiple assignment of the addresses
Interrupt enabled with an individual release bit per counter/timer and
interrupt status register
Available clock: PCI clock divided by four (APCI-1710 only) or 10 MHz of
the onboard quartz oscillator, selectable through software
Typical applications:
Event counter
Programmable rate generator
Binary rate multiplier
Square-wave generator
Complex motor controller / signal generator
Programmable modes
For each counter/timer (3 x 32-bit) there are 6 modes available: mode 0 to
mode 5, which can be programmed independently.
Mode 0: Interrupt on terminal count
Mode 0 is particularly suitable for event counting. The output is initially set
to “Low” and remains “Low” until the counter reaches 0.
The output then goes “High” and holds this state until a new count or a
new counter value is written into the counter.
Mode 1: Hardware retriggerable one-shot
This mode is identical to mode 0 except for the GATE input. The GATE input
is not used to activate or deactivate the timer, but to trigger it.
Mode 2: Pulse generator
In this mode the counter is dividing the choosed input clock through the
start value “ul_ReloadValue”. Mode 2 is used for generating a real-time
clock interrupt.
After initialization the output is set to “High”. When the initial count has
decremented to 1, the output goes “Low”. For only one clock pulse the
output is setted on “Low” then it goes back to“High”. The counter reloads
the start value (“ul_ReloadValue”) and the counter sequence is repeated.
The number of sequences is unlimited. An interrupt can be generated at the
end of the cycle. Calculation of time: (ul_ReloadValue +2) x input clock
Mode 3: Square wave mode
Mode 3 is used for baud rate generation. It is similar to mode 2 except for
the duty cycle of the output. The output is initially set to “High”. When half
the initial count has expired, the output is set to “Low” for the remainder
of the count. Mode 3 is periodic; the same sequence is repeated indenitely.
Calculation of time: (ul_ReloadValue +2) x input clock
Mode 4: Software-triggered strobe
The output is initially set to “High”. When the initial count expires, the
output goes “Low” for one clock pulse and then goes “High” again. The
counting sequence is triggered by writing the initial count.
If a new count is written during counting, it will be loaded on the next
clock pulse and counting will continue from the new count.
Clock 0
Gate 0
Out 0
PCI clock/4
or 10 MHz
Inv gate 0
-Ex
Inv Out 0
Ax
TIMER 0
DQ0..31
PCI clock/4,
or 10 MHz
Clock 1
Gate 1
Inv gate 1
Fx
Inv clk 1
Inv Out 1
Bx
Cx
Out 1
TIMER 1
PCI clock/4,
or 10 MHz
Clock 2
Gate 2
Out 2
Inv gate 2
Gx
Inv clk 2
Inv Out 2
Hx
TIMER 2
Dx
DQ0..31
DQ0..31
DQ0..31
DQ0..31
DQ0..31
32-bit reload register
32-bit counter
32-bit latch register
32-bit reload register
32-bit counter
32-bit latch register
32-bit reload register
32-bit counter
32-bit latch register
=1
=1
=1
=1
=1
=1
=1
=1
Mode 5: Hardware-triggered strobe (retriggerable)
This mode is identical to mode 4 except for the GATE input. The GATE input
is not used to activate or deactivate the timer, but to trigger it.
Used signals
Signal name Pin name Signal type Function
OUT1_x Ax +/- Diff./TTL Output of counter/timer 0
OUT2_x Bx +/- Diff./TTL Output of counter/timer 1
OUT3_x Hx 24 V / 5 V opt. Output of counter/timer 2
GATE1_x Ex 24 V / 5 V opt. GATE Input of counter/timer 0
GATE2_x Fx 24 V / 5 V opt. GATE Input of counter/timer 1
GATE3_x Gx 24 V / 5 V opt. GATE Input of counter/timer 2
CLK1_x - - Internal clock
CLK2_x Cx +/- Diff./TTL/ 24 V opt. Clock counter input
of counter/timer 1
CLK3_x Dx +/- Diff./ TTL/ 24 V opt. Clock counter input
of counter/timer 2
The Counter/Timer function is suited only to a limited extent for the APCI-1710-24V.
Block diagram Counter/Timer
x: Number of the function module (See pin assignment page 179)
Phone: +49 7229 1847-0 info
@
addi-data.com
Fax: +49 7229 1847-222 www.addi-data.com
182
PCI, counter – APCI-1710