Instruction manual

Table Of Contents
PC215E Page 78
6.6.5 Differential Counter Functions
6.6.5.1 Setup Differential Counter Pair - TCsetDiffCounters
Sets up two counter/timers for a differential count operation. If the gate sources specified are
both GAT_VCC, counting will start immediately. Otherwise the user must provide the gate
signals or set the gates high by a call to TCsetGate. See section 4.2.1 for more details on the
Differential Counter application.
i = TCsetDiffCounters (h, chip1, chan1, clk1, gat1, chip2, chan2,
clk2, gat2)
where
h Integer. Board handle as issued by the
registerBoard function.
chip1 Integer. Address offset of timer/counter chip
#1. One of the following pre-defined constants
may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
chan1 Integer. Timer/counter #1 channel number
within the chip (0, 1 or 2).
clk1 Integer. Timer #1 clock source. Use one of the
following pre-defined constants:-
CLK_CLK = 0: CLK(
chan#1
) - external i/p
CLK_10MHZ = 1: 10 MHz
CLK_1MHZ = 2: 1 MHz
CLK_100KHZ = 3: 100 kHz
CLK_10KHZ = 4: 10 kHz
CLK_1KHZ = 5: 1 kHz
CLK_OUTN_1 = 6: OUT(chan#1-1)
CLK_EXT = 7: EXTCLK(chip) - external
i/p
gat1 Integer. Timer #1 gate source. Use one of the
following pre-defined constants:-
GAT_VCC = 0: Enabled
GAT_GND = 1: Disabled
GAT_EXT = 2: GAT(chan) - external i/p
GAT_OUTN_2 = 3: /OUT(chan-2)
chip2 Integer. Address offset of timer/counter chip
#2. One of the following pre-defined constants
may be used:
X1 = 0
X2 = 4