Setting Up/Down Counting (1-fold, 2-phase encoding)
Select "1-fold and 2-phase encoding" by the timer count clock source selection of the timer mode register
(TMnMD). The binary counter counts up at the rising edge of the TMnBIN pin when the TMnAIN pin is set to
"1" and counts down at the falling edge as indicated in the following table. When the TMnAIN pin is "L", count-
ing is not operated. When "1-fold and 2-phase encoding" is set, The TMUD1-0 flag of the TMnMD register is set
to "00" to specify up counting.
Table:9.6.3 Operation Condition of 1-fold, 2-phase encoding
TMnAIN pin
"H"
"L"
Setting Up/Down Counting (4-fold, 2-phase encoding)
Select "4-fold and 2-phase encoding" by the timer count clock source selection of the timer mode register
(TMnMD). The counting up/down condition is as shown in the following table. When "4-fold and 2-phase encod-
ing" is set, the TMUD1-0 flag of the TMnMD register is set to "00" to specify up counting.
Table:9.6.4 Setting Condition of 4-fold, 2-phase encoding
TMnAIN pin
"H"
"L"
↑
↓
Setting Up/Down Counting (Count Clock)
The binary counters counts up or down by the condition of the input pin at the timing of the count clock.
Select "10, or "11" by the timer up/down selection of the timer mode register (TMnMD). The counting up/down
condition is as shown in the following table.
Table:9.6.5 Operation Condition of Count Clock
TMnAIN pin
"H"
"L"
TMnBIN pin
↑
Up counting
Down counting
-
"H"
-
-
Down counting
Up counting
Up counting
Down counting
TMUD1 to 0 flag (TMnMD register)
10
Up counting
Down counting
↓
-
TMnBIN pin
↑
"L"
-
Up counting
-
Down counting
-
-
At count clock timing
↓
Down counting
Up counting
-
-
11
Down counting
Up counting
Up/Down Counting
Chapter 9
16-bit Timer
IX - 49