HT46R24/HT46C24
I/O
Mode
PD0
PD1
PD2
PD3
I/P
O/P
I/P
(Normal) (Normal) (PWM)
Logical Logical Logical
Input Output Input
O/P
(PWM)
PWM0
PWM1
PWM2
PWM3
It is recommended that unused or not bonded out I/O
lines should be set as output pins by software instruction
to avoid consuming power under input floating state.
PWM
The microcontroller provides 4 channels (6+2)/(7+1)
(depends on options) bits PWM output shared with
PD0/PD1/PD2/PD3. The PWM channels have their data
registers denoted as PWM0 (1AH), PWM1 (1BH),
PWM2 (1CH) and PWM3 (1DH). The frequency source
of the PWM counter comes from fSYS. The PWM regis-
ters are four 8-bit registers. The waveforms of PWM
outputs are as shown. Once the PD0/PD1/PD2/PD3 are
selected as the PWM outputs and the output function of
PD0/PD1/PD2/PD3 are enabled (PDC.0/PDC.1/
PDC.2/PDC.3 =²0²), writing ²1² to PD0/PD1/PD2/PD3
data register will enable the PWM output function and
writing ²0² will force the PD0/PD1/PD2/PD3 to stay at
²0².
A (6+2) bits mode PWM cycle is divided into four modu-
lation cycles (modulation cycle 0~modulation cycle 3).
Each modulation cycle has 64 PWM input clock period.
In a (6+2) bit PWM function, the contents of the PWM
register is divided into two groups. Group 1 of the PWM
register is denoted by DC which is the value of
PWM.7~PWM.2. The group 2 is denoted by AC which is
the value of PWM.1~PWM.0.
fS Y S /2
[P W M ] = 1 0 0
PW M
2 5 /6 4
2 5 /6 4
2 5 /6 4
[P W M ] = 1 0 1
PW M
2 6 /6 4
2 5 /6 4
2 5 /6 4
[P W M ] = 1 0 2
PW M
2 6 /6 4
2 6 /6 4
2 5 /6 4
[P W M ] = 1 0 3
PW M
2 6 /6 4
2 6 /6 4
P W M m o d u la tio n p e r io d : 6 4 /fS Y S
M o d u la tio n c y c le 0
M o d u la tio n c y c le 1
2 6 /6 4
M o d u la tio n c y c le 2
P W M c y c le : 2 5 6 /fS Y S
(6+2) PWM Mode
2 5 /6 4
2 5 /6 4
2 5 /6 4
2 5 /6 4
M o d u la tio n c y c le 3
2 5 /6 4
2 6 /6 4
2 6 /6 4
2 6 /6 4
M o d u la tio n c y c le 0
fS Y S /2
[P W M ] = 1 0 0
PW M
[P W M ] = 1 0 1
PW M
[P W M ] = 1 0 2
PW M
[P W M ] = 1 0 3
PW M
Rev. 2.00
5 0 /1 2 8
5 0 /1 2 8
5 1 /1 2 8
5 0 /1 2 8
5 1 /1 2 8
5 1 /1 2 8
5 2 /1 2 8
P W M m o d u la tio n p e r io d : 1 2 8 /fS Y S
M o d u la tio n c y c le 0
P W M c y c le : 2 5 6 /fS Y S
5 1 /1 2 8
M o d u la tio n c y c le 1
(7+1) PWM Mode
18
5 0 /1 2 8
5 1 /1 2 8
5 1 /1 2 8
5 2 /1 2 8
M o d u la tio n c y c le 0
March 2, 2006