Input Capture Frequency Measurement Mode
In this mode, the TCB captures the counter value and restarts on either a positive or negative edge of the
event input signal.
The interrupt flag is automatically cleared after the high byte of the Compare/Capture register
(TCBn.CCMP) has been read, and an interrupt request is generated.
The figure below illustrates this mode when configured to act on rising edge.
Figure 20-5. Input Capture Frequency Measurement
Event Input
Edge detector
MAX
CNT
BOTTOM
Copy CNT to CCMP ,
interrupt and restart
Input Capture Pulse-Width Measurement Mode
The input capture pulse-width measurement will restart the counter on a positive edge and capture on the
next falling edge before an interrupt request is generated. The interrupt flag is automatically cleared when
the high byte of the capture register is read. The timer will automatically switch between rising and falling
edge detection, but a minimum edge separation of two clock cycles is required for correct behavior.
©
2018 Microchip Technology Inc.
16-bit Timer/Counter Type B (TCB)
Copy CNT to CCMP ,
interrupt and restart
Datasheet Preliminary
®
megaAVR
0-Series
" Interrupt "
Copy CNT to CCMP ,
interrupt and restart
DS40002015A-page 238
Need help?
Do you have a question about the megaAVR 0 Series and is the answer not in the manual?