Instruction manual
AMPDIO DRIVERS
Page 42
associated with callback. This means that by asking the driver for data you can be sure that the
data is sampled soon after the event that caused the interrupt.
The driver supports the following data requests:
ISR_NODATA = –1 Reads value 0 from a null source.
ISR_READ_16COUNT = 0 Reads a specified 16-bit counter (Chip1, Chan1).
ISR_READ_16COUNTSTAT = 16 Reads status and count from a specified 16-bit counter
(Chip1, Chan1). Bits 23 to 16 contain the status. Bits 15 to
0 contain the count. (For PC24E/PC25E, PC26AT, PC27E
and PC30AT, bits 31 to 16 will contain the value FFFF
16
.)
ISR_READ_32COUNT = 1 Reads two specified 16-bit counters (Chip1, Chan1,
Chip2, Chan2). The first specified counter is read into the
low 16 bits; the second specified counter is read into the
next 16 bits and is assumed to be clocked from the output
of the first counter. From version 5.04 of the driver
onwards, both counters are read a second time. If the
second counter’s value changes between the two
readings, the second set of readings is used, otherwise
the first set of readings is used. Earlier versions of the
driver (version 3.00 onwards) only read the counters twice
if their values couldn’t be latched simultaneously (because
they were on different chips or used the older 82C53 chip).
ISR_READ_32COUNTSTAT= 17 Reads status and count from two specified 16-bit counters
(Chip1, Chan1, Chip2, Chan2), yielding two data values on
each interrupt. The status and count read from the first
specified counter is formed into the first data value. The
status and count read from the second specified counter is
formed into the second data value. The second counter is
assumed to be clocked from the output of the first counter.
From version 5.04 of the driver onwards, both counters
are read a second time. If the second counter’s value
changes between the two readings, the second set of
readings is used, otherwise the first set of readings is
used. Earlier versions of the driver (version 3.00 onwards)
only read the counters twice if their values couldn’t be
latched simultaneously (because they were on different
chips or used the older 82C53 chip). For each data value,
bits 23 to 16 contain the status and bits 16 to 0 contain the
count. (For PC24E/PC25E, PC26AT, PC27E and
PC30AT, bits 31 to 16 will contain the value FFFF
16
.)
ISR_READ_PPIABC = 5 Reads PPI ports A, B and C (Chip1, [Chan1=0]). Port A is
read into the low 8 bits, port B into the next 8 bits and port
C into the next 8 bits.
ISR_READ_2PPIABC = 13 Like ISR_READ_PPIABC but reads ports A, B and C from
two specified PPI chips (Chip1, Chip2), yielding two data
values on each interrupt. Ports A, B and C from the first
specified PPI chip are formed into the first data value.
Ports A, B and C from the second specified PPI chip are
formed into the second data value.
ISR_READ_3PPIABC = 14 Like ISR_READ_PPIABC but reads ports A, B and C from
three fixed PPI chips (PPIX, PPIY and PPIZ), yielding