|
7220 Datasheet, PDF (97/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
FUNCTIONAL DESCRIPTION
2.10 PWM
2.10.5 8-bit PWM output control
How to control the 8-bit PWM output is described below.
The PWM0âPWM7 output pins are also used for port P00âP03 and P60âP63.
 Set â0â to bit 0 of the PWM output control register 1 (address 00D516) to supply the PWM count source
(this bit is cleared to â0â after reset).
 Write output data to the corresponding 8-bit PWM registers (addresses 00D016 to 00D416 and 00F616).
 Set the corresponding bit of the port P0 direction register to â1â to specify the output mode.
 Select the output polarity by bit 3 of the PWM output control register 2 (address 00D616). When this bit
is cleared to â0,â a positive polarity is selected; when set to â1,â a negative polarity is selected.
 By setting â1â to the corresponding bits among bits 2 to 7 of the PWM output control register 1, the pins
are given the PWM output function to output the PWM. When clearing to â0,â the pins become general-
purpose ports (ports P00âP05).
PWM Output Control Register 2
b7 b6 b5 b4 b3 b2 b1 b0
PWM output control register 2 (PN) [Address 00D616]
B
Name
Functions
After reset R W
0, 1 Nothing is assigned. These bits are write disable bits.
0
Râ
When these bits are read out, the values are â0.â
2 DA output polarity
selection bit (PN3)
0 : Positive polarity
1 : Negative polarity
0 RW
3 PWM output polarity 0 : Positive polarity
selection bit (PN4)
1 : Negative polarity
0 RW
4 DA general-purpose
output bit (PN5)
0 : Output LOW
1 : Output HIGH
0 RW
5 Nothing is assigned. These bits are write disable bits. 0 R â
to When these bits are read out, the values are â0.â
7
Fig. 2.10.7 PWM output control register 2 (address 00D616)
2-70
7220 Group Userâs Manual
|
▷ |