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
17
PC215E
4.2.1 Differential Counter
Two timer/counters can be used to form a Differential Counter pair from which the ratio of, or the
difference between, the two count values is derived. See section 6.6.5 "Differential Counter
Functions".
The function TCsetDiffCounters allows you to specify the two timer/counters to be used as a
differential pair. The function registers the timer/counter pair as being 'in use' and unavailable
for any other application. Provision is also made by
TCsetDiffCounters
to specify the clock and
gate connections for both timer/counters.
The functions
TCgetDiffCount
and
TCgetRatio
can be called at any time after
TCsetDiffCounters
, and these two functions latch and read the current count values of the
timer/counters, using the read-back command, and return the difference and ratio of the two
count values respectively. Function
TCfreeDiffCounters
can be called when finished with the
differential counter, and releases the timer/counter pair so they become available for use by
another application.
4.2.2 Monostable Multivibrator
Mode 1 of the 82C54 timer/counter provides a digital one-shot output. This can be used to
implement a monostable multivibrator pulse. In this mode, the output of the timer goes low at
the falling edge of the first clock succeeding the gate trigger, and is kept low until the counter
value becomes 0. Once the output is set high, it remains high until the clock pulse succeeding
the next gate trigger.
Function TCsetMonoshot allows you to specify a timer/counter and a monostable pulse duration
(in seconds). See section 6.6.6.1 "Send Monostable Pulse - TCsetMonoShot". The function
calculates the counter/timer clock source and initial count value required to generate the
specified pulse length, and programs the timer/counter accordingly.
It is the responsibility of the user to provide the external gate signal to trigger the monostable
output.
4.2.3 Astable Multivibrator
An extension of the monostable multivibrator is to have two such timer/counters each generating
an output pulse of specified duration, but each being triggered by the end of the other
timer/counter's pulse. By adjusting the two pulse duration times, an astable multivibrator
waveform with a given frequency and mark-to-space ratio can be attained.
This application is implemented in function
TCsetAstable
- see section 6.6.6.2. The
msratio
argument to the function specifies the mark-to-space ratio, and this is defined as follows:
mark-to-space ratio = mark time / overall period
The function registers the timer/counters as being 'in use' and unavailable for any other
application. Function
TCfreeAstable
can be called when finished with the astable multivibrator,
and releases the timer/counters so they become available for use by another application.
The output of each timer/counter must be connected externally via the user connector, SK1, to
the gate input of the other timer/counter.
The
TCsetAstable
function calculates the input clock frequencies and counter divide ratios
(CDRs) for the two timers and makes the selections automatically.