MC95FG0128A
100
Aug 02, 2018 Ver.2.9
11.5.2.3 16-Bit Capture Mode
The timer X(2~5) capture mode is set by CAPx
as ‘1’ in TxCR register. The clock is same source as
Output Compare mode. The interrupt occurs at TxH, TxL and TxDRH, TxDRL matching time. The
capture result is loaded into CDRxH, CDRxL. The TxH, TxL value is automatically cleared(0000
H
) by
hardware and restarts counter.
This timer interrupt in capture mode is very useful when the pulse width of captured signal is wider
than the maximum period of timer. As the EIEDGE and EIPOLA register setting, the external interrupt
INTx function is chosen.
The CDRxH, PWMxHDR and TxH are in same address. In the capture mode, reading operation is
read the CDRxH, not TxH because path is opened to the CDRxH. PWMxHDR will be changed in
writing operation. The PWMxLDR, TxL, CDRxL has the same function.
P
R
E
S
C
A
L
E
R
÷ 1
÷ 4
÷ 8
÷ 16
÷ 64
÷ 256
÷ 1024
÷ 2048
MUX
TxH(8-bit)
TxL(8-bit)
16-bit Counter
TxST
TxEN
4
ECTN,TxCK[2:0]
f
X
INTx
EIEDGE[5:2]
clear
INTxIF
INTx
Interrupt
16-bit Capture Register
TxIF
Timerx
Interrupt
CDRxH(8-bit)
CDRxL(8-bit)
TxDRH(8-bit)
TxDRL(8-bit)
16-bit Timer Data Register
comparator
-
-
-
-
-
ECEN
TxPE
POL
TxCR
TxCR1
ADDRESS : BA
H
, C2
H
, CA
H
, 2F38
H
INITIAL VALUE : 0000_0000
b
ADDRESS : BB
H
, C3
H
, CB
H
, 2F39
H
INITIAL VALUE : ----_-000
b
TxEN
PWMxE
CAPx
TxCK2
TxCK1
TxCK0
TxCN
TxST
ECx
Figure 11.18 16-bit Capture Mode of Timer x
11.5.2.4 PWM Mode
The timer X(2~5) has a PWM (pulse Width Modulation) function. In PWM mode, the TX/PWMX
output pin outputs up to 16-bit resolution PWM output. This pin should be configured as a PWM
output by set TX
_PE to ‘1’. The PWM output mode is determined by the PWMxHPR, PWMxLPR,
PWMxHDR and PWMxLDR. And you should configure PWMxE bit to
“1” in TxCR register
PWM Period = [ PWMxHPR, PWMxLPR ] X Source Clock
PWM Duty = [ PWMxHDR, PWMxLDR ] X Source Clock
Summary of Contents for MC95FG0128A
Page 26: ...MC95FG0128A 26 Aug 02 2018 Ver 2 9 4 Package Diagram Figure 4 1 100 pin LQFP package...
Page 27: ...MC95FG0128A Aug 02 2018 Ver 2 9 27 Figure 4 2 80 pin LQFP package...
Page 28: ...MC95FG0128A 28 Aug 02 2018 Ver 2 9 Figure 4 3 80 pin MQFP package...
Page 29: ...MC95FG0128A Aug 02 2018 Ver 2 9 29 Figure 4 4 64 pin LQFP package...
Page 30: ...MC95FG0128A 30 Aug 02 2018 Ver 2 9 Figure 4 5 64 pin LQFP14 package...