
16
Manual PCIe-DIO-24HC PCI Express Digital I/O w/CTR
Mode 0: Pulse on Terminal Count
After the counter is loaded, the output is set low and will remain low until the counter
decrements to zero. The output then goes high and remains high until a new count is
loaded into the counter. A trigger enables the counter to start decrementing.
Mode 1: Retriggerable One-Shot
The output goes low on the clock pulse following a trigger to begin the one-shot pulse
and goes high when the counter reaches zero. Additional triggers result in reloading
the count and starting the cycle over. If a trigger occurs before the counter decrements
to zero, a new count is loaded. This forms a retriggerable one-shot. In mode 1, a low
output pulse is provided with a period equal to the counter count-down time.
Mode 2: Rate Generator
This mode provides a divide-by-N capability where N is the count loaded into the
counter. When triggered, the counter output goes low for one clock period after N
counts, reloads the initial count, and the cycle starts over. This mode is periodic, the
same sequence is repeated indefinitely until the gate input is brought low. This mode
also works well as an alternative to mode 0 for event counting.
Mode 3: Square Wave Generator
This mode operates like mode 2. The output is high for half of the count and low for the
other half. If the count is even, then the output is a symmetrical square wave. If the
count is odd, then the output is high for (N+1)/2 counts and low for (N-1)/2 counts.
Periodic triggering or frequency synthesis are two possible applications for this mode.
Note that in this mode, to achieve the square wave, the counter decrements by two for
the total loaded count, then reloads and decrements by two for the second part of the
wave form.
Mode 4: Software Triggered Strobe
This mode sets the output high and, when the count is loaded, the counter begins to
count down. When the counter reaches zero, the output will go low for one input
period. The counter must be reloaded to repeat the cycle. A low gate input will inhibit
the counter.
Mode 5: Hardware Triggered Strobe
In this mode, the counter will start counting after the rising edge of the trigger input and
will go low for one clock period when the terminal count is reached. The counter is
retriggerable. The output will not go low until the full count after the rising edge of the
trigger.
Counter/Timer Registers
Base + 10 Write/Read: Counter#A0 When writing, this register is used to load a count
value into the counter. The transfer is either a single or double byte transfer,
depending on the control byte written to the counter control register at BASE
ADDRESS +13. If a double byte transfer is used, then the least-significant byte of the
16 bit value is written first, followed by the most significant byte. When reading, the
current count of the counter is read. The type of transfer is also set by the control byte.
Base + 11 Write/Read: Counter #A1 See description for Base + 10 Write/Read.