Jameco Electronics 3000 ユーザーズマニュアル

ページ / 349
106
Rabbit 3000 Microprocessor
Each Input Capture counter operates in one of three modes, or can be disabled. The 
counter is never automatically reset, but must be reset by a software command. Although 
it does not generate an interrupt, there is a status bit which is set when the counter over-
flows (counts from 0xFFFF to 0x0000) so that software can recognize this condition. To 
prevent potential stale-data problems, whenever the LSB of the latched count is read from 
the ICLxR, the corresponding MSB of the latched count is transferred to a holding register 
until read from the ICMxR.
In the first mode the counter starts counting at the Start condition and stops counting at the 
Stop condition. This mode is useful for pulse width measurement if the Start condition and 
Stop condition are assigned to the same pin. The Input Capture inputs were chosen to take 
maximum advantage of this mode, to allow baud-rate detection for the serial ports and 
rotational speed measurement for the Quadrature Decoder channels. Using this mode with 
different inputs for the Start and Stop condition allows time-delay measurements between 
two signals. This is the mode to use for high-speed pulse measurement, because only one 
count latch is available, and it may be overwritten if the processor is not able to read the 
latched value quickly enough. When the counter starts from a known count only the stop 
count is necessary to determine the pulse width.
In the second mode the counter runs continuously and the Start and Stop conditions 
merely latch the current count. This mode is useful for time-stamping the input conditions 
against the time reference of the counter. If the time-stamp feature is not needed, this 
mode gives the Rabbit 3000 up to four more external interrupt inputs. This mode works 
well for slower-speed pulse measurement, where the processor has enough time to read 
the count latched by the Start condition before the Stop condition occurs and latches a new 
count.
In the third mode the counter runs continuously until the Stop condition occurs. This mode 
measures the time from the software-defined counter start until the Stop condition occurs 
on an input. Note that once the counter stops because of the Stop condition, it will not 
resume counting until re-enabled by software.