Intel 8XC196MH, 8XC196MD, 8XC196MC manual Wgreload

Models: 8XC196MD 8XC196MH 8XC196MC

1 579
Download 579 pages 24.12 Kb
Page 544
Image 544

REGISTERS

WG_RELOAD

WG_RELOAD

Address:

1FC8H

 

Reset State:

0000H

The waveform generator reload (WG_RELOAD) register and the phase compare registers (WG_COMPx) control the carrier period and duty cycle. Write a value to the reload register to establish the carrier period.

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_COMPx at the same time, immediately after the interrupt.

15

0

 

Reload

 

 

Bit

Function

Number

 

 

 

15:0

Reload

This register determines the carrier period.

Use the following formulas to calculate carrier period and duty cycle.

TCARRIER

= multiplier--------------------------×-----WG----------_---RELOAD------------------------

 

FXTAL1

 

WG_COMPx

Duty Cycle = --WG---------_---RELOAD-----------------------× 100%

where:

 

TCARRIER

= carrier period, in µs

FXTAL1

= input frequency on XTAL1 pin, in MHz

multiplier

= 4 for center-aligned modes; 2 for edge-aligned modes

WG_RELOAD

= 16-bit WG_RELOAD value WG_COMPx

WG_COMPx

= 16-bit WG_COMPx value WG_RELOAD

C-67

Page 544
Image 544
Intel 8XC196MH, 8XC196MD, 8XC196MC manual Wgreload