28.3.4 Capture Mode
Pulse Width or Time Between Events
The following steps explain how to measure the pulse width or time between events. Note that for proper
operation a start condition needs to be the first event seen once the input capture is enabled , if a stop con-
dition occurs first, the system will stop without taking a measurement..
1. Select the same input pin to perform a pulse-width measurement between the start and stop condi-
tions, or select two different input pins to measure time between events on those pins.
2. Set the counter to start on the start condition and stop on the stop condition, latch on the stop condi-
tion, and generate an interrupt on the stop condition.
3. In the interrupt handler, read out the counter to determine the pulse width or time interval between
the two events.
Time-Stamp External Events
The following steps explain how to time-stamp external events.
1. Set the trigger for the desired event type.
2. Set the counter to run continuously, latch on the start (and/or stop) condition, and generate an inter-
rupt on the start (and/or stop) condition
3. In the interrupt handler, read out the counter as an event timestamp.
Measure Time Interval from a Software Start to an External Event
The following steps explain how to measure the time interval between a software start and the occurrence
of an external event.
1. Set up the counter to run continuously, latch on the stop condition, and generate an interrupt on the
stop condition. The option to not enable the stop condition is not available since those bits would be
ignored in the count mode.
2. Set up the stop condition for the event of interest.
3. Reset the counter via ICCSR at the software start.
4. In the interrupt handler, read the counter as a time duration.
28.3.5 Count Mode
The following steps explain how to count pulses when count mode is selected:
1. Set the ICTxR register for the counter to run continuously and to latch the count on either the start
or stop condition.
2. If an interrupt is desired at a particular count, write that value into the LSB and MSB registers.
3. Set the start condition for the pulse type desired.
4. Reset the counter by writing to ICCSR.
5. Reading the latch registers at any time after an initial start pulse is received will return the current
count. Until an initial start pulse is received, the latch registers will have a residual value.
Rabbit 6000 User's Manual
digi.com
327
Need help?
Do you have a question about the 6000 and is the answer not in the manual?