R01UH0136EJ0210 Rev.2.10
Page 289 of 800
Jul 31, 2012
M16C/64A Group
17. Timer A
Figure 17.11 Operation Example in 16-Bit Pulse Width Modulation Mode
n
i = 0 to 4
POFSi: Bit in the TAPOFS register
fj: Count source frequency
The above timing diagram assumes the following:
- The MR0 bit in the TAiMR register = 1 (pulse output)
- The MR3 bit in the TAiMR register = 0 (16-bit PWM mode)
- The MR1 bit in the TAiMR register = 1
- The MR2 bit in the TAiMR register = 1
- Bits TAiTGH to TAiTGL in the ONSF or TRGSR register = 00b
TAiIN input
0000h
TAiOUT output
Low-level output
at count stop
IR bit in the
TAiIC register
TAiS bit in the
TABSR register
Reload count started
when a value other than
0000h is written.
65535-n
65535
65535
Count stopped
Becomes 0
by a program
Count stopped
Low-level output
at count stop
Interrupt not requested
n
65535-n
n
fj
65535
fj
Set to 0 by accepting an interrupt request, or by a program.
Interrupt request generated:
- When TAiOUT changes
state from high to low while
POFSi is 0.
- When TAiOUT changes
state from low to high while
POFSi is 1. (The IR bit does
not change when output has
no change.)
The rising edge of the TAiIN pin input is the trigger.
n
b15
b0
TAi register
Operates as a 16-bit pulse width modulator
65535
Count started
Reload 0000h and
stop counting.
Cannot be a retrigger
after count start
Write 0000h to the TAi
register during this period.
Interrupt request generated
- when TAiOUT changes from high to low while POFSi is 0.
- when TAiOUT changes from low to high while POFSi is 1.
POFSi = 0
POFSi = 1
High-level output
at count stop
Count
operations
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...