Programming The Frequency And Period - Intel 8XC196MC User Manual

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL
The counter counts down to 00H, at which time the PWM output is driven high, the counter value
is reloaded from the PWM_PERIOD register, and the contents of the control registers are loaded
into the buffers. The PWM output remains high until the counter value matches the value in the
buffer, at which time the output is pulled low. You can read the count register (PWM_COUNT)
to see the current value of the counter. When the counter resets again (i.e., when an overflow oc-
curs) the output is switched high. (Loading PWMx_CONTROL with 00H forces the output to re-
main low.) Figure 10-2 shows typical PWM output waveforms.
The PWMx_CONTROL register value and corresponding duty cycle result, in
Figure 10-2, are true only when the PWM_PERIOD register value is FFH.
Duty
Cycle
0%
10%
50%
90%
99.6%

10.4 PROGRAMMING THE FREQUENCY AND PERIOD

The input frequency on XTAL1 (F
mine the PWM output frequency (F
frequencies for common values of F
lowing formulas to calculate the PWM period value for the desired output frequency and write
the corresponding value to the PWM_PERIOD register.
×
512 (PWM_PERIOD
(in µs)
--------------------------------------------------------------------------- -
T
=
PWM
--------------------------------------------------------------------------- -
F
(in MHz) =
× PWM_PERIOD
PWM
512 (
10-4
NOTE
PWM Control
Register Value
00H
0
19H
0
80H
0
0
E6H
FFH
0
Figure 10-2. PWM Output Waveforms
) and the contents of the PWM_PERIOD register deter-
XTAL 1
) and period (T
PWM
with a variety of PWM_PERIOD values. Use the fol-
1
XTAL
+
1)
F
1
XTAL
F
1
XTAL
+
1)
Get other manuals https://www.bkmanuals.com
Output Waveform
). Table 10-3 shows the PWM output
PWM
A0119-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents