TIMER A
7905 Group User’s Manual Rev.1.0
7-41
7.6 Pulse width modulation (PWM) mode
7.6.1 Setting for PWM mode
Figures 7.6.3 and 7.6.4 show an initial setting example for registers relevant to the PWM mode.
Note that when using interrupts, set up to enable the interrupts. For details, refer to “CHAPTER 6.
INTERRUPTS.”
Fig. 7.6.3 Initial setting example for registers related to PWM mode (1)
Note. When operating as 8-bit pulse width modulator
(m+1) (2 – 1)
fi
n(m+1)
fi
However, if n = “00 16”, the pulse width modulator
does not operate and the TAi OUT pin outputs “L”
level. At this time, no timer Ai interrupt request
occurs.
b7
b0
Count source select bits
See Table 7.2.3.
11
Selecting PWM mode and each function
Timer Ai mode register (i = 0 to 9)
(Addresses 5616 to 5A16, D616 to DA16)
1
16/8-bit PWM mode select bit
0 : Operates as 16-bit pulse width modulator
1 : Operates as 8-bit pulse width modulator
Continued to Figure 7.6.4
on the next page
Trigger select bits
0 0 :
0 1 :
1 0 : Falling edge of TAiIN pin’s input signal: External trigger
1 1 : Rising edge of TAiIN pin’s input signal: External trigger
b3
b4
Selection of PWM mode
Setting PWM pulse’s period and “H” level width
b7
b0
Can be set to “000016” to “FFFE16” (n)
(b15)
(b8)
b7
b0
Timer A0 register (Addresses 4716, 4616)
Timer A1 register (Addresses 4916, 4816)
Timer A2 register (Addresses 4B16, 4A16)
Timer A3 register (Addresses 4D16, 4C16)
Timer A4 register (Addresses 4F16, 4E16)
Timer A5 register (Addresses C716, C616)
Timer A6 register (Addresses C916, C816)
Timer A7 register (Addresses CB16, CA16)
Timer A8 register (Addresses CD16, CC16)
Timer A9 register (Addresses CF16, CE616)
Timer A0 register (Addresses 4716, 4616)
Timer A1 register (Addresses 4916, 4816)
Timer A2 register (Addresses 4B16, 4A16)
Timer A3 register (Addresses 4D16, 4C16)
Timer A4 register (Addresses 4F16, 4E16)
Timer A5 register (Addresses C716, C616)
Timer A6 register (Addresses C916, C816)
Timer A7 register (Addresses CB16, CA16)
Timer A8 register (Addresses CD16, CC16)
Timer A9 register (Addresses CF16, CE616)
Note. When operating as 16-bit pulse width modulator
2 – 1
fi
n
fi
However, if n = “0000 16”, the pulse width modulator does
not operate and the TAi OUT pin outputs “L” level. At this
time, no timer Ai interrupt request occurs.
q When operating as 16-bit pulse width modulator
b7
b0
Can be set to “0016” to “FF16” (m)
(b15)
(b8)
b7
b0
q When operating as 8-bit pulse width modulator
Can be set to “0016” to “FE16” (n)
16
8
Writing “1” to count start bit: Internal trigger
Period =
“H” level width =
Period =
“H” level width =
(fi : Frequency of
count source)
(fi : Frequency of count source)