Instruction manual
AMPDIO DRIVERS
Page 143
6.4.8.14 Set up a Restricted Periodic Pulse Train Generator — TCsetRestrictedPulseTrain
Sets up a restricted periodic pulse train on the specified timer channel (the 'pulse' channel).
Each train of pulses is output within a restricted period equal to the clock period of a second
timer channel (the 'train' channel).
SUPPORTED IN VERSION 4.32 ONWARDS.
The 'train' channel is offset by -2 from the specified 'pulse' channel. If the 'pulse' channel is
timer channel 0 or 1 on a timer chip, the 'train' channel will be channel 1 or 2 on the next lower
timer chip or on the highest timer chip (due to wrap-around).
If the board lacks clock connection and gate connection registers, the clock sources must be
wired up manually and the output of the 'train' channel must be inverted and wired up
manually to the gate input of the 'pulse' channel.
For PC214E: Timer Z1 channel 0 provides an inverted output on connector SK1 so this is best
used as the 'train' channel, using Z1 channel 2 as the 'pulse' channel. Wire Ctr Z1 /OUT0 O/P
(pin 54) to Ctr Z1 GAT2 I/P (pin 75), set J2 to the 'train' clock source and set J4 to the 'pulse'
clock source. The pulse train output is on Ctr Z1 OUT2 O/P (pin 17).
i = TCsetRestrictedPulseTrain (h, pulseChip, pulseChan, pulseClock,
pulseCount, pulseShape, trainClock, trainGate, trainFreq)
where h short: board handle as issued by the
registerBoardEx function.
pulseChip short: address offset of timer/counter chip for
the pulse generator. One of the following pre-
defined constants may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
pulseChan short: timer/counter channel number within the
chip for the pulse generator (0, 1 or 2). Another
timer/counter channel (pulseChan-2) will also
be used, and may be on the previous chip or
wrap around to the highest chip.
pulseClock short: clock source for the pulse generator.
One of the following pre-defined constants may
be used, or use -1 to choose a value
automatically for boards with clock connection
registers:
-1 (choose automatically)
CLK_10MHZ = 1 (fixed 10 MHz clock)
CLK_1MHZ = 2 (fixed 1 MHz clock)
CLK_100KHZ = 3 (fixed 100 kHz clock)
CLK_10KHZ = 4 (fixed 10 kHz clock)
CLK_1KHZ = 5 (fixed 1 kHz clock)
pulseCount short: number of pulses to output in each train.