Rabbit 6000 User’s Manual
digi.com
322
28. I
NPUT
C
APTURE
28.1 Overview
The input capture peripheral consists of two channels, each of which contains a 16-bit counter and edge-
detection circuitry. The input capture channels are usually used to determine the time between events. An
event is signaled by a rising or falling edge (or optionally by both edges) on one of 12 input pins that can
be selected as the input for either of the two channels. A digital low-pass filter is present on the inputs, as
explained in Section 28.2.4.
Each channel can be used in one of two modes—input capture or input count.
In the input-capture mode, the channel starts/stops the counter (clocked by Timer A8) according to the sig-
nal edges of the selected parallel port pins, providing the ability to measure pulse widths and time intervals
between external events, time-stamp signal changes on a pin, and measure time intervals between a soft-
ware start and an external event.
In the input-count mode the channel simply increments the counter each time the selected edge is detected.
The start condition is enabled by the first Timer A8 clock after the mode is selected, and the stop condition
is generated when the count matches the value written into the counter registers; this allows an interrupt to
be generated when a particular count is reached.
A latch records the value of a 16 bit counter when the event takes place. The counter is driven by the out-
put of Timer A8 which is driven by Timer A12 and the Timer A prescaler. If the counter rolls over to zero,
a register bit is set and an interrupt can be generated.
Two events are recognized: a
start condition
and a
stop condition
. The start condition may be used to start
counting and the stop condition to stop counting. However, the counter may also run continuously or run
until a stop condition is encountered. The start and stop conditions may also be used to latch the current
count at the instant the condition occurs rather than actually start or stop the counter. The same pin may be
used to detect the start and stop condition—for example a rising edge could be the start condition and a
falling edge could be the stop condition. The start and stop condition can also be the input from separate
pins.
The input capture channels can be used to measure the width of fast pulses. This is done by starting the
counter on the first edge of the pulse and capturing the counter value on the second edge of the pulse. In
this case the maximum error in the measurement is approximately 2 periods of the clock used to increment
the counter. If there is sufficient time between events for an interrupt to take place the unit can be set up to
capture the counter value on either start or stop conditions (or both) and cause an interrupt each time the
count is captured. The counter can also be cleared and started under software control and then have its
value captured in response to an input.
The capture counter can synchronized with Timer B outputs to load parallel port output registers. This
makes it possible to generate an output signal precisely synchronized with an input signal.
Содержание 6000
Страница 1: ...Rabbit 6000 Microprocessor User s Manual 90001108_J...
Страница 11: ...Rabbit 6000 User s Manual digi com 11 1 3 Block Diagram Figure 1 1 Rabbit 6000 Block Diagram...
Страница 43: ...Rabbit 6000 User s Manual digi com 43 4 1 1 Block Diagram...
Страница 57: ...Rabbit 6000 User s Manual digi com 57 5 1 1 Block Diagram...
Страница 88: ...Rabbit 6000 User s Manual digi com 88 7 2 Block Diagram...
Страница 115: ...Rabbit 6000 User s Manual digi com 115 11 1 1 Block Diagram...
Страница 127: ...Rabbit 6000 User s Manual digi com 127 12 1 1 Block Diagram...
Страница 138: ...Rabbit 6000 User s Manual digi com 138 13 1 1 Block Diagram...
Страница 154: ...Rabbit 6000 User s Manual digi com 154 15 1 1 Block Diagram...
Страница 163: ...Rabbit 6000 User s Manual digi com 163 16 1 1 Block Diagram...
Страница 170: ...Rabbit 6000 User s Manual digi com 170 17 1 1 Block Diagram...
Страница 177: ...Rabbit 6000 User s Manual digi com 177 18 1 1 Block Diagram...
Страница 186: ...Rabbit 6000 User s Manual digi com 186 19 1 1 Block Diagram...
Страница 230: ...Rabbit 6000 User s Manual digi com 230 22 2 Block Diagram...
Страница 234: ...Rabbit 6000 User s Manual digi com 234 Figure 22 3 Sample Slow A D Converter Circuit...
Страница 287: ...Rabbit 6000 User s Manual digi com 287 25 1 1 Block Diagram...
Страница 310: ...Rabbit 6000 User s Manual digi com 310 26 1 1 Block Diagram...
Страница 323: ...Rabbit 6000 User s Manual digi com 323 28 1 1 Block Diagram...
Страница 351: ...Rabbit 6000 User s Manual digi com 351 31 1 4 Block Diagram...
Страница 361: ...Rabbit 6000 User s Manual digi com 361 32 1 1 Block Diagram...
Страница 369: ...Rabbit 6000 User s Manual digi com 369 33 2 Block Diagram...
Страница 390: ...Rabbit 6000 User s Manual digi com 390 35 1 1 Block Diagram...
Страница 408: ...Rabbit 6000 User s Manual digi com 408...
Страница 410: ...Rabbit 6000 User s Manual digi com 410...
Страница 411: ...Rabbit 6000 User s Manual digi com 411...
Страница 420: ...Rabbit 6000 User s Manual digi com 420 Figure 37 1 Memory Read and Write Cycles...