ht82a836r Holtek Semiconductor Inc., ht82a836r Datasheet - Page 51

no-image

ht82a836r

Manufacturer Part Number
ht82a836r
Description
Usb Audio Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT82A836R
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
Pulse Width Modulator
The device contains a 2 channel Pulse Width Modulator
function, more commonly known as PWM. Useful for
such applications 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 partic-
ular values into the corresponding PWM registers.
The device has two PWM outputs for which two 8-bit
PWM registers are provided and are known as PWM0
and PWM1. It is in these registers, that the 8-bit value,
which represents the overall duty cycle of one modula-
tion cycle of the output waveform, should be placed. To
increase the PWM modulation frequency, each modula-
tion cycle is modulated into two or four individual modu-
lation sub-sections, known as the 7+1 mode or 6+2
respectively. The mode selection is made using the
PWMC register. Note that it is only necessary to write
the required modulation value into the corresponding
PWM0 or PWM1 register, as the subdivision of the
waveform into its sub-modulation cycles is implemented
automatically within the microcontroller hardware. For
all devices, the PWM clock source is the system clock
f
This method of dividing the original modulation cycle
into a further 2 or 4 sub-cycles enables the generation of
higher PWM frequencies, which allow a wider range of
applications to be served. As long as the periods of the
generated PWM pulses are less than the time constants
of the load, the PWM output will be suitable for driving,
as such long time constant loads will average out the
pulses of the PWM output. The difference between what
is known as the PWM cycle frequency and the PWM
modulation frequency should be understood. As the
PWM clock is the system clock, f
value is 8-bits wide, the overall PWM cycle frequency is
f
the PWM modulation frequency will be f
the PWM modulation frequency for the 6+2 mode of op-
eration will be f
Rev. 1.00
SYS
SYS
.
/256. However when in the 7+1 mode of operation,
SYS
/64.
SYS
, and as the PWM
(6+2) PWM Mode Output Waveform
SYS
/128, while
51
The overall PWM output enable/disable is controlled us-
ing the PWMC register which acts like an on/off switch
for each PWM output.
6+2 PWM Mode
Each full PWM cycle, as it is controlled by an 8-bit PWM
register, has 256 clock periods. However, in the 6+2
PWM mode, each PWM cycle is subdivided into four in-
dividual sub-cycles known as modulation cycle 0 ~ mod-
ulation cycle 3, denoted as i in the table. Each one of
these four sub-cycles contains 64 clock cycles. In this
mode, a modulation frequency increase of four is
achieved. The 8-bit PWM register value, which repre-
sents the overall duty cycle of the PWM waveform, is di-
vided into two groups. The first group which consists of
bit2~bit7 is denoted here as the DC value. The second
group which consists of bit0~bit1 is known as the AC
value. In the 6+2 PWM mode, the duty cycle value of
each of the four modulation sub-cycles is shown in the
following table.
The following diagram illustrates the waveforms associ-
ated with the 6+2 mode of PWM operation. It is impor-
tant to note how the single PWM cycle is subdivided into
4 individual modulation cycles, numbered from 0~3 and
how the AC value is related to the PWM value.
f
f
SYS
SYS
Modulation cycle i
/64 for (6+2) bits mode
/128 for (7+1) bits mode
Parameter
(i=0~3)
Modulation
6+2 Mode Modulation Cycle Values
PWM
AC (0~3)
i<AC
i AC
PWM Cycle
Frequency
f
SYS
/256
HT82A836R
(Duty Cycle)
March 20, 2008
PWM Cycle
[PWM]/256
DC+1
DC
DC
64
64
Duty

Related parts for ht82a836r