5.1 Input Capture Pin--ICPn Configuration

The Input Capture Register can capture the Timer/Counter value when a change of the logic level (an event) occurs on either the Input Capture pin (ICPn) or alternatively on the Analog Comparator output (ACO). To select the ICPn pin, the ACSR.ACIC should first be cleared to disable the Analog Comparator input capture function. Secondly, the users need to set the WGM[3:0] value for choosing the Timer/counter operation mode not using the ICRn register as Timer/counter TOP value. For more information about WGM[3:0] setting, see the table below.

Table 5-1. Waveform Generation Mode Bit Description
WGM[3:0]Timer/Counter mode of operationTOP
0Normal0xFFFF
1PWM,Phase Correct, 8 BIT0x0FFF
2PWM, Phase Correct, 9 BIT0x01FF
3PWM, Phase Correct, 10 BIT0x03FF
4CTCOCR4A
5Fast PWM, 8 BIT0x00FF
6Fast PWM, 9 BIT0x01FF
7Fast PWM, 10 BIT0x03FF
8PWM, Phase, and Frequency CorrectICR1
9PWM, Phase, and Frequency CorrectOCR4A
10PWM, Phase, and Frequency CorrectICR1
11PWM, Phase, and Frequency CorrectOCR4A
12CTCICR1
13Reserved-
14Fast PWMICR1
15Fast PWMOCR4A
Figure 5-1. Analog Comparator Control and Status Register

Bit 2 – ACIC: Analog Comparator Input Capture Enable

When written logic one, this bit enables the input capture function in Timer/Counter to be triggered by the Analog Comparator; When written logic zero, no connection between the Analog Comparator and the input capture function exists.