Instruction manual
Table Of Contents
- INTRODUCTION
- GETTING STARTED
- MAKING THE CONNECTIONS
- USING THE PC215E
- STRUCTURE AND ASSIGNMENTS OF THE REGISTERS
- Register Assignments
- Register Groups
- The Register Details
- Programmable Peripheral Interface PPI-X Data Register Port A
- Programmable Peripheral Interface PPI-X Data Register Port B
- Programmable Peripheral Interface PPI-X Data Register Port C
- Programmable Peripheral Interface PPI-X Command Register
- Programmable Peripheral Interface PPI-Y Data Register Port A
- Programmable Peripheral Interface PPI-Y Data Register Port B
- Programmable Peripheral Interface PPI-Y Data Register Port C
- Programmable Peripheral Interface PPI-Y Command Register
- Z1 Counter 0 Data Register
- Z1 Counter 1 Data Register
- Z1 Counter 2 Data Register
- Counter/Timer Z1 Control Register
- Z1 Counter/Timer Status Register
- Z2 Counter 0 Data Register
- Z2 Counter 1 Data Register
- Z2 Counter 2 Data Register
- Counter/Timer Z2 Control Register
- Z2 Counter/Timer Status Register
- Group Z Clock Connection Register
- Group Z Gate Connection Register
- Interrupt Source Selection Register
- Interrupt Status Register
- PROGRAMMING THE PC215E
- Copyright
- Files installed from the Distribution Diskette
- Windows DLL and Examples
- DOS 'C' Library and Examples
- Using the Dynamic Link Library
- Windows and DOS Library Functions
- Initialisation Functions
- Interrupt Control Functions
- Data Buffer Functions
- Timer/Counter Functions
- Differential Counter Functions
- Frequency Generation Functions
- Millisecond Stopwatch Functions
- Frequency Input and Output Functions
- Digitally- and Voltage-Controlled Oscillator Functions
- Digital Input/Output Functions
- Switch Scanner Matrix Functions
- Bi-Directional Data Bus Functions
- PC215E Library Error Codes
- PC215E Interface Guide For LABTECH NOTEBOOK
- Guide to User Programming
- Signal Centre
- CONTENTS
- DECLARATION OF CONFORMITY

Page
83
PC215E
6.6.6.2 Generate Astable Multivibrator Waveform - TCsetAstable
Generates a clock signal of specified frequency and mark-to-space ratio. This is implemented
on two counters, both in mode 1 (digital one-shot). One counter counts the mark time and the
other counts the space time. The outputs of each counter/timer control the gate of the other,
so that when the mark times-out, the space counter is triggerred and vice versa. N.B. the user
must connect each counter’s gate to the other’s output on the user connector SK1. See section
4.2.3 for more details on the Astable application.
i = TCsetAstable (h, chip, chan, chipS, chanS, freq, msratio)
where
h Integer. Board handle as issued by function
registered board.
chip Integer. Address offset of timer/counter chip.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
chan Integer. Timer/counter channel number within
the chip (0, 1 or 2).
chipS Integer. Address offset of secondary
timer/counter chip. One of the following pre-
defined constants may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
chanS Integer. Secondary timer/counter channel
number within the chip (0, 1 or 2).
freq Float. Desired frequency, in Hertz.
msratio Float. Desired mark to space ratio, defined as
(mark time/period), i.e. 0 is D.C. 0V, 1 is D.C.
5V, 0.5 is symmetrical square wave, i.e. high for
1 and low for 1.
Returns Integer:
Handle to the astable multi-vibrator (positive integer). Use this
handle to call the TCfreeAstable function when finished, in order to
free up the counter/timers for re-use.
or ERRHANDLE
ERRDATA
Prior Calls registerBoard
See Also TCfreeAstable