Setting For Pwm Mode - Renesas 7700 FAMILY User Manual

Mitsubishi 16-bit single-chip microcomputer
Table of Contents

Advertisement

5.6.1 Setting for PWM mode

Figures 5.6.2 and 5.6.3 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 4. INTERRUPTS."
Selecting PWM mode and each function
b7
Setting PWM pulse's period and "H" level width
When operating as 16-bit pulse width modulator
(b15)
b7
When operating as 8-bit pulse width modulator
(b15)
b7
Note: When operating as 8-bit pulse width modulator
Period =
"H" level width =
fi : Frequency of count source
However, if n = "00
does not operate and the TAi
level. At this time, no timer Ai request occurs.
Fig. 5.6.2 Initial setting example for registers relevant to PWM mode (1)
b0
1
1 1
Timer Ai mode register (i = 0 to 4) (Addresses 56
Selection of PWM mode
Trigger select bits
b4
b3
0 0 :
Writing "1" to count start bit: Internal trigger
0 1 :
1 0 : Falling of TAi
1 1 : Rising of TAi
16/8-bit PWM mode select bit
0 : Operates as 16-bit pulse width modulator
1 : Operates as 8-bit pulse width modulator
Count source select bits
b7 b6
0 0 : f
/f
2
4
0 1 : f
/f
16
32
1 0 : f
/f
64
128
1 1 : f
/f
512
1024
(b8)
b0
b7
Can be set to "0000
(b8)
b0
b7
8
(m+1) (2
– 1)
fi
n(m+1)
fi
", the pulse width modulator
16
pin outputs "L"
OUT
Continue to Figure 5.6.3 .
7751 Group User's Manual
5.6 Pulse width modulation (PWM) mode
pin's input signal
: External trigger
IN
pin's input signal
: External trigger
IN
Timer A0 register (Addresses 47
Timer A1 register (Addresses 49
b0
Timer A2 register (Addresses 4B
Timer A3 register (Addresses 4D
Timer A4 register (Addresses 4F
" to "FFFE
" (n)
16
16
Timer A0 register (Addresses 47
Timer A1 register (Addresses 49
b0
Timer A2 register (Addresses 4B
Timer A3 register (Addresses 4D
Timer A4 register (Addresses 4F
Can be set to "00
" to "FF
16
Can be set to "00
" to "FE
16
Note: When operating as 16-bit pulse width modulator
16
(2
– 1)
Period =
fi
n
"H" level width =
fi
fi : Frequency of count source
However, if n = "0000
not operate and the TAi
no timer Ai request occurs.
TIMER A
to 5A
)
16
16
, 46
)
16
16
, 48
)
16
16
, 4A
)
16
16
, 4C
)
16
16
, 4E
)
16
16
, 46
)
16
16
, 48
)
16
16
, 4A
)
16
16
, 4C
)
16
16
, 4E
)
16
16
" (m)
16
" (n)
16
", the pulse width modulator does
16
pin outputs "L" level. At this time,
OUT
5–41

Advertisement

Table of Contents
loading

This manual is also suitable for:

7751 series

Table of Contents