Приветствую, уважаемые!
Расскажите/покажите, как использовать ICP1 для данной задачи. Ведь явно специальный вход.
The Timer/Counter incorporates an Input Capture unit that can capture external events
and give them a time-stamp indicating time of occurrence. The external signal indicating
an event, or multiple events, can be applied via the ICP1 pin or alternatively, via the
Analog Comparator unit. The time-stamps can then be used to calculate frequency,
duty-cycle, and other features of the signal applied.
Видимо решение тут: http://www.embedds.com/programming-1...-on-atmega328/