HT46RU66/HT46CU66
V
D
D
P
u
l
l
-
h
i
g
h
C
o
D
n
t
r
o
l
B
i
t
O
p
t
i
o
n
D
a
t
a
B
u
s
Q
Q
C
K
W
r
i
t
e
C
o
n
t
r
o
l
R
e
g
i
s
t
e
r
S
C
h
i
p
R
e
s
e
t
P
C
6
/
T
X
R
e
a
d
C
o
n
t
r
o
l
R
e
g
i
s
t
e
r
D
a
t
a
B
i
t
D
Q
Q
W
r
i
t
e
D
a
t
a
R
e
g
i
s
t
e
r
C
K
S
M
U
F
r
o
m
U
A
R
T
T
X
X
M
U
U
A
R
T
E
N
&
T
X
E
N
X
R
e
a
d
D
a
t
a
R
e
g
i
s
t
e
r
PC6/TX Input/Output Ports
V
D
D
P
u
l
l
-
h
i
g
h
C
o
n
t
r
o
l
B
i
t
O
p
t
i
o
n
D
Q
D
a
t
a
B
u
s
W
r
i
t
e
C
o
n
t
r
o
l
R
e
g
i
s
t
e
r
C
K
Q
S
C
h
i
p
R
e
s
e
t
P
C
7
/
R
X
R
e
a
d
C
o
n
t
r
o
l
R
e
g
i
s
t
e
r
D
a
t
a
B
i
t
D
C
Q
W
r
i
t
e
D
a
t
a
R
e
g
i
s
t
e
r
K
Q
S
M
U
X
R
e
a
d
D
a
t
a
R
e
g
i
s
t
e
r
T
o
U
A
R
T
R
X
PC7/RX Input/Output Ports
Pulse Width Modulator
duty cycle of one modulation cycle of the output wave-
form, should be placed. To increase the PWM modula-
tion frequency, each modulation cycle is subdivided into
two or four individual modulation subsections, known as
the 7+1 mode or 6+2 mode respectively. The device can
choose which mode to use by selecting the appropriate
configuration option. When a mode configuration option
is chosen, it applies to all PWM outputs on that device.
Note that when using the PWM, it is only necessary to
write the required value into the appropriate PWM regis-
ter and select the required mode configuration option,
the subdivision of the waveform into its sub-modulation
cycles is done automatically within the microcontroller
hardware.
Each devices is provided with either three or four Pulse
Width Modulation (PWM) outputs, depending upon
which package type is selected. Useful for such applica-
tions such as motor speed control, the PWM function
provides outputs with a fixed frequency but with a duty
cycle that can be varied by setting particular values into
the corresponding PWM register.
A single register, located in the Data Memory is as-
signed to each PWM output. For devices with three
PWM outputs, these registers are known as PWM0,
PWM1 and PWM2. Devices with four PWM outputs re-
quire a further additional register known as PWM3. It is
here that the 8-bit value, which represents the overall
Rev. 1.20
25
October 2, 2007