hey guys.. does anyone know how to utilize the ICP1 pin on the UNO board? it is pin number 14.. but how to use it.. the data sheet is kinda confusing..
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 mul- tiple 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. Alternatively the time-stamps can be used for creating a log of the events.
It looks like you can configure things so that every time ICP1 changes state, the timer1 count at that time is copied to the "input capture register." Then you can read the register and get a time that the pin change occurred, potentially at a greater precision than you could in a SW loop looking at the pin...