Input Capture: Connect a digital signal to a pin of Port T. Can capture the time of an edge (rising, falling or either) - the edge will latch the value of TCNT into TCx register. This is used to measure the difference between two times.
To use Port T Pin x as an input capture pin:
->
Bit 7 of TSCR reg)
->
bit x of TIOS reg)
EDGxB | EDGxA | |
0 | 0 | Disabled |
0 | 1 | Rising Edge |
1 | 0 | Falling Edge |
1 | 1 | Either Edge |
->
bit x of TFLG1 reg, 0 ->
all other bits of TFLG1)
->
bit x of TMSK1 reg)
->
bit x of TFLG1 reg, 0 ->
all other bits of TFLG1)
->
bit x of TFLG1 reg, 0 ->
all other bits of TFLG1)