Figure 20-3. Time-Out Check Mode
Event Input
Edge detector
MAX
TOP
CNT
BOTTOM
Input Capture on Event Mode
The counter will count from BOTTOM to MAX continuously. When an event is detected the counter value
will be transferred to the Compare/Capture register (TCBn.CCMP) and interrupt is generated. The module
has an edge detector that can be configured to trigger count capture on either rising or falling edges.
The figure below shows the input capture unit configured to capture on falling edge on the event input
signal. The interrupt flag is automatically cleared after the high byte of the Capture register has been
read.
Figure 20-4. Input Capture on Event
Event Input
Edge detector
MAX
CNT
BOTTOM
Copy CNT to CCMP
and interrupt
It is recommended to write zero to the TCBn.CNT register when entering this mode from any other mode.
©
2018 Microchip Technology Inc.
16-bit Timer/Counter Type B (TCB)
Copy CNT to CCMP
Wraparound
Datasheet Preliminary
®
megaAVR
0-Series
TOP changed to a value
lower than CNT
Counter wraps
around
" Inter rupt"
" Interrupt"
and interrupt
DS40002015A-page 237
Need help?
Do you have a question about the megaAVR 0 Series and is the answer not in the manual?
Questions and answers