![Seiko Epson S1C17153 Скачать руководство пользователя страница 88](http://html1.mh-extra.com/html/seiko-epson/s1c17153/s1c17153_technical-manual_1235939088.webp)
11 16-BiT PWM TiMeR (T16a2)
S1C17153 TeChniCal Manual
Seiko epson Corporation
11-9
(Rev. 1.0)
PWM waveform output timings
normal clock mode (hCM = 0)
Count clock
T16A_TC
x
TOUTA
x
/TOUTB
x
T16A_CCA
x
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
n
0
0
1
2
n-1
n
0
1
1
2
n-2
n-1
(n = T16A_CCB
x
)
Count clock
T16A_TC
x
TOUTA
x
/TOUTB
x
Example: HCM = 0, T16A_CCA
x
= 1, and T16A_CCB
x
= 5
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
5
0
1
2
4
5
0
1
3
6.3 PWM Waveform Output Timings in Normal Clock Mode
Figure 11.
half clock mode (hCM = 1)
Count clock
T16A_TC
x
Dual-edge counter
TOUTA
x
/TOUTB
x
T16A_CCA
x
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
n
2n
0
–
0
0
1
2
3
4
2n-3 2n-2 2n-1
2n
–
0
1
1
2
n-1
n
0
1
1
2
3
4
2n-4 2n-3 2n-2 2n-1
(n = T16A_CCB
x
)
Count clock
T16A_TC
x
Dual-edge counter
TOUTA
x
/TOUTB
x
Example: HCM = 1, T16A_CCA
x
= 1, and T16A_CCB
x
= 5
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
5
10
0
–
0
1
2
3
4
7
8
9
10
–
0
1
1
2
4
5
0
1
5
6
3
6.4 PWM Waveform Output Timings in Half Clock Mode
Figure 11.
T16a2 interrupts
11.7
The T16A2 module can generate the following six kinds of interrupts:
• Compare A interrupt (in comparator mode)
• Compare B interrupt (in comparator mode)
• Capture A interrupt (in capture mode)
• Capture B interrupt (in capture mode)
• Capture A overwrite interrupt (in capture mode)
• Capture B overwrite interrupt (in capture mode)
The T16A2 module outputs a single interrupt signal shared by the above interrupt causes to the interrupt controller
(ITC). Read the interrupt flags in the T16A2 module to identify the interrupt cause that has been occurred.