M16C/62P Group (M16C/62P, M16C/62PT)
15. Timers
Rev.2.41
Jan 10, 2006
Page 155 of 390
REJ09B0185-0241
Figure 15.14
Example of 16-bit Pulse Width Modulator Operation
Figure 15.15
Example of 8-bit Pulse Width Modulator Operation
1 / f
i
×
(2
16
−
1)
Count source
Input signal to
TAiIN pin
PWM pulse output
from TAiOUT pin
Trigger is not generated by this signal
“H”
“L”
IR bit in TAiIC
register
“1”
“0”
fj : Frequency of count source
(f1, f2, f8, f32, fC32)
i = 0 to 4
NOTES :
1. n = 0000h to FFFEh.
2. This timing diagram is for the case where the TAi register is “0003h”, the TAiTGH and TAiTGL bits in the ONSF or TRGSR
register = 00b (TAiIN pin input), the MR1 bit of TAiMR register = 1 (rising edge), and the MR2 bit in the TAiMR register = 1
(trigger selected by TAiTGH and TAiTGL bits).
1 / f
j
×
n
Set to “0” upon accepting an interrupt request or by writing in program
“H”
“L”
Count source
(1)
Input signal to
TAiIN pin
Underflow signal of
8-bit prescaler
(2)
PWM pulse output
from TAiOUT pin
“H”
“H”
“H”
“L”
“L”
“L”
“1”
“0”
Set to “0” upon accepting an interrupt request or by writing in program
NOTES :
1. The 8-bit prescaler counts the count source.
2. The 8-bit pulse width modulator counts the output from the 8-bit prescaler underflow signal.
3. m = 00h to FFh; n = 00h to FEh.
4. This timing diagram is for the case where the TAi register is “0202h”, the TAiTGH and TAiTGL bits in the ONSF or TRGSR
register = 00b (TAiIN pin input), the MR1 bit in the TAiMR register = 0 (falling edge), and the MR2 bit in the TAiMR register
= 1 (trigger selected by TAiTGH and TAiTGL bits).
1 / f
j
×
(m
+ 1)
×
(2
8
- 1)
1 / f
j
×
(m + 1)
×
n
1 / f
j
×
(m + 1)
IR bit in TAiIC
register
fj : Frequency of count source
(f1, f2, f8, f32, fC32)
i = 0 to 4
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655