
R01UH0336EJ0102 Rev.1.02
Page 1007 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 18 Encoder Timer (ENCA)
18.6
Timing Charts for Encoder Operations
(1)
Timing of Basic Encoder Operation 1 (Encoder Comparison Mode 1)
<Setting condition>
• ENCAnCTL.ENCAnCRM[1:0] = 00
B
:
Comparison is selected as the function of the ENCAnCCR0 and
ENCAnCCR1 registers.
• ENCAnCTL.ENCAnECM[1:0] = 01
B
:
If counting after a match between the values in the counter and the
ENCAnCCR0 register is upwards, the counter is cleared.
• ENCAnCTL.ENCAnLDE = 1:
When the counter underflows, it is loaded with the value from the
ENCAnCCR0 register.
Figure 18-17
Timing of Basic Encoder Operation 1 (Encoder Comparison Mode 1)
A compare match interrupt (INTENCAnI0) is generated when the values of the
counter and register ENCAnCCR0 (D0) match.
If further counting is upwards, the counter is cleared to 0000
H
because
ENCAnECM0 = 1.
A compare match interrupt (INTENCAnI1) is generated when the values of the
counter and register ENCAnCCR1 (D1) match.
Counter clearing due to a match with ENCAnCCR1 does not proceed because
ENCAnECM1 = 0.
An underflow interrupt (INTENCAnIUD) is generated when the counter
underflows.
ENCAnLDE = 1, so the counter is loaded with the value from the ENCAnCCR0
register (D0) when the counter underflows.
ENCAnLDE = 1 and ENCAnECM[1:0] = 01
B
, so counting is from 0000
H
to the
setting of the ENCAnCCR0 register.
ENCAnCCR0 register
INTENCAnI0 interrupt
ENCAnCSF flag
ENCAnUDF flag
ENCAnCCR1 register
INTENCAnI1 interrupt
D0
D1
0000
H
D0
D1
INTENCAnIUD interrupt
16-bit counter
Содержание V850 Series
Страница 1556: ...V850E2 PG4 L R01UH0336EJ0102 Back Cover ...