Intel 8XC196MC User Manual page 536

Table of Contents

Advertisement

WG_COMP x
x = 1–3
The phase compare (WG_COMP x ) register controls the duty cycle of each phase. Write a value to
each phase compare register to specify the length of time that the associated outputs will remain
asserted.
Changing the WG_RELOAD value changes both the carrier period and the duty cycle because the
outputs remain asserted for a constant length of time, while the counter takes longer to cycle. To
change the carrier period without changing the duty cycle, you must proportionally change both
WG_RELOAD and WG_COMP x at the same time, immediately after the interrupt.
15
Bit
Number
15:0
Compare
These bits determine the length of time that the associated outputs are asserted.
Use the following formulas to calculate output assertion time and duty cycle.
multiplier WG_COMPx
---------------------------------------------------------------- -
T
=
O UTPU T
Duty Cycle
where:
T
OUTPUT
F
1
XTAL
multiplier
WG_RELOAD
WG_COMP x
Compare
×
F
XT AL1
WG_COMPx
×
------------------------------------- -
=
100%
WG_RELOAD
= total time output is asserted, in µs
= input frequency on XTAL1 pin, in MHz
= 4 for center-aligned modes; 2 for edge-aligned modes
= 16-bit WG_RELOAD value ≥ WG_COMP x
= 16-bit WG_COMP x value ≤ WG_RELOAD
Get other manuals https://www.bkmanuals.com
Address:
Reset State:
Function
REGISTERS
WG_COMPx
1FC2H,1FC4H,1FC6H
0000H
0
C-59

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents