English
Language : 

UPD784938 Datasheet, PDF (398/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 15 PWM OUTPUT UNIT
15.2.2 PWM prescaler register (PWPR)
PWPR is an 8-bit register that selects the PWM output circuit operating clock (fPWMC).
PWPR can be read or written to with an 8-bit manipulation instruction. Its format is shown in Figure 15-3.
When RESET is input, PWPR is cleared to 00H, and fCLK is selected as fPWMC for both channels.
Figure 15-3. PWM Prescaler Register (PWPR) Format
7
6
5
4
3
2
1
0 Address After reset R/W
PWPR 0 PWP12 PWP11 PWP10 0 PWP02 PWP01 PWP00 0FF71H 00H R/W
(n = 0, 1)
PWPn2 PWPn1 PWPn0 PWMn Operating PWMn Repetition Frequency
Clock (fPWMC)
(fCLK = 12.58 MHz)
0
0
0
fCLK
fCLK/256 (49.14 kHz)
0
0
1
0
1
0 fCLK/2
fCLK/512 (24.58 kHz)
0
1
1 fCLK/3
fCLK/768 (16.38 kHz)
1
0
0 fCLK/4
fCLK/1,028 (12.28 kHz)
Other than the above Setting prohibited
15.2.3 PWM modulo registers (PWM0, PWM1)
The PWM modulo register (PWMn: n = 0, 1) is a 16-bit register that determines the PWM pulse width. Reads/writes
by a 16-bit manipulation instruction are possible for data setting.
The contents of bits 4 to 15 of the PWMn determines the 12-bit PWM pulse width (12-bit resolution). Bits 3 to 0 have
no meaning, and PWM output is not affected whether 1 or 0 is written to these bits.
When RESET is input, the PWMn content are undefined, and therefore data must be set by the program before PWM
output is enabled.
Caution A value between 0000H and 00FFH should not be set in the PWM modulo registers (PWMn: n = 0, 1).
A value between 0100H and FFFFH should be set in the PWMn registers. The PWM signal duty values
that can be output are 17/4,096 to 4,096/4,096.
398
Preliminary User’s Manual U13987EJ1V0UM00