12. Timer 0/1/2/3/4/5
A96G140/A96G148/A96A148 User’s manual
136
12.5.3
16-bit PPG mode
TIMER 4 has a PPG (Programmable Pulse Generation) function. In PPG mode, T4O/PWM4O pin
outputs up to 16-bit resolution PWM output. For this function, T4O/PWM4O pin must be configured as
a PWM output by setting P0FSRH[3:2
] to ‘
1
1’. Period of the PWM output is determined by
T4ADRH/T4ADRL, and duty of the PWM output is determined by T4BDRH/T4BDRL.
T4MS[1:0]
T4POL
Reload
A Match
T4CC
T4EN
P
r
e
s
c
a
l
e
r
fx
M
U
X
fx/2
fx/4
fx/32
fx/128
fx/512
fx/8
fx/1
Comparator
16-bit Cou nte r
T4CNTH/T4CNTL
16-bit B Data Re gister
T4BDRH/T4BDRL
Clear
B Match
T3 A Match
Buffer Reg ister B
Comparator
16-bit A Data Re gister
T4ADRH/T4ADRL
T4IFR
S/W
Clear
To i nte rrupt
block
A Match
Buffer Reg ister A
Reload
Pulse
Gen erator
T4O
R
T4EN
3
T4CK[2:0]
2
A Match
T4CC
T4EN
A Match
T4CC
T4EN
T4EN
T4CRH
1
ADDRES S:1008H
INITIAL VALUE : 0000_0000B
–
T4MS1
T4MS0
–
–
–
T4CC
–
1
1
–
–
–
X
T4CK2
T4CRL
X
ADDRES S:1009H
INITIAL VALUE : 0000_0000B
T4CK1
T4CK0
T4IFR
–
T4POL
–
T4CNTR
X
X
X
–
X
–
X
PWM4O
NOTES
:
1.
T4EN is automatically cleared to logic
“0” after one pulse is generated at a PPG one-shot mode.
2.
T4 A Match is a pulse for the timer 4 clock source if it is selected.
Figure 67. 16-bit PPG Mode of Timer 4