Programming The Duty Cycle - Intel 8XC196MC User Manual

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL
PWM_PERIOD
The PWM period (PWM_PERIOD) register controls the period of the PWM outputs. It contains a value
that determines the number of state counts necessary for incrementing the PWM counter. The value
of PWM_PERIOD is loaded into the PWM period count register whenever the count equals zero.
7
Bit
Number
7:0
PWM Period
This register controls the period of the PWM outputs. The value of PWM_PERIOD is
loaded into the PWM period count register whenever the count equals zero.
Figure 10-3. PWM Period (PWM_PERIOD) Register

10.5 PROGRAMMING THE DUTY CYCLE

The values written to the PWMx_CONTROL and PWM_PERIOD registers control the width of
the high pulse, effectively controlling the duty cycle. The 8-bit value written to the control regis-
ter is loaded into a buffer, and this value is used during the next period. Use the following duty
cycle formula to calculate a desired duty cycle for given values of PWMx_CONTROL and
PWM_PERIOD, and then write these values to the appropriate registers.
Duty Cycle (in %)
Pulsewidth (in µs)
where:
PWM x _CONTROL
=
PWM_PERIOD
=
Pulsewidth
=
T
=
PWM
10-6
PWM Period
PWM x _CONTRO L
------------------------------------------------------ -
=
PWM_PERIO D
+
×
Duty Cycle
T
PWM
----------------------------------------------- -
=
100
8-bit value to load into the PWM x _CONTROL register
8-bit value to load into the PWM_PERIOD register
width of each high pulse
output period on the PWM pin, in µs
Get other manuals https://www.bkmanuals.com
Function
×
100
1
Address:
1FB4H
Reset State:
00H
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents