8XC196MC, MD, MH USER’S MANUAL

WG_CONTROL

WG_CONTROL

Address:

1FCCH

 

Reset State (MC, MD):

00C0H

 

Reset State (MH):

8000H

The waveform generator control (WG_CONTROL) register controls the operating mode, dead time, and count direction, and enables and disables the counter.

15

M2

M1

M0

7

 

 

 

 

 

 

 

DT7

DT6

DT5

DT4

 

 

 

 

8

CS

EC

DT9

DT8

 

 

 

0

 

 

 

 

DT3

DT2

DT1

DT0

 

 

 

 

Bit

Bit

 

 

 

 

 

Function

Number

Mnemonic

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

Reserved; for compatibility with future devices, write zero to this bit.

 

 

 

 

 

14:12

M2:0

Operating Mode

 

 

 

 

This field controls the waveform generator’s operating mode:

 

 

M2

M1

M0

Mode

 

 

0

 

0

0

0

center-aligned; update registers once

 

 

0

 

0

1

1

center-aligned; update registers twice

 

 

0

 

1

0

2

edge-aligned; update registers once

 

 

0

 

1

1

3

edge-aligned; update registers twice

 

 

1

 

1

1

4

(8XC196MH only) edge-aligned; update

 

 

 

 

 

 

 

WG_COMPx and WG_COUNTER only when

 

 

 

 

 

 

 

WG_COUNTER = WG_RELOAD

 

 

 

 

 

11

CS

Counter Status

 

 

 

 

This read-only bit indicates whether the counter is counting up or

 

 

counting down.

 

 

 

 

0

= down counting

 

 

 

 

1

= up counting

 

 

 

 

 

 

 

10

EC

Enable Counter

 

 

 

 

This bit starts and stops the counter.

 

 

0

= disable (stop) counter

 

 

1

= enable (start) counter

 

 

 

 

 

 

9:0

DT9:0

Dead-time

 

 

 

 

 

This field specifies the dead-time for all three phases. Use the following

 

 

formula to calculate the appropriate DT_VALUE.

 

 

 

 

 

TDEAD

× FXT AL1

 

 

DT_VALUE = ------------------------------------------

 

 

 

 

 

 

 

2

 

 

where:

 

 

 

 

 

 

TDEAD

= dead-time, in µs

 

 

FXTAL1 = input frequency on XTAL1 pin, in MHz

C-60

Page 537
Image 537
Intel 8XC196MD, 8XC196MH, 8XC196MC manual Wgcontrol