Period Register; Width Register; Counter - Motorola DragonBall MC68328 User Manual

Integrated processor
Table of Contents

Advertisement

Pulse Width Modulator
CLKSEL
These bits select the output of the divider chain. The codings are
000 = Divide by 2
011 = Divide by 16
110 = Divide by 128

11.2.2 Period Register

This register controls the PWM period. When the counter value matches the value in this
register, an interrupt is posted and the counter is reset to start another period.
15
14
13
12
ADDRESS: $(FF)FFF502
PERIOD
This is the value that resets the counter. There is one special case: when this register is
$00, the output is never set high (0% duty cycle).

11.2.3 Width Register

This register controls the pulse width. When the counter matches the value in this register,
the output is reset for the duration of the period. Note that if the value in this register is higher
than the period register, the output will never be reset, resulting in a 100% duty cycle.
15
14
13
12
ADDRESS: $(FF)FFF504
WIDTH
When the counter reaches the value in this register, the output is reset.

11.2.4 Counter

This read-only register is the current count value and can be read at any time without dis-
turbing the counter.
15
14
13
12
ADDRESS: $(FF)FFF506
COUNT
This is the current count value.
11-4
MC68328 DRAGONBALL PROCESSOR USER'S MANUAL
001 = Divide by 4
100 = Divide by 32
111 = Divide by 256
11
10
9
8
PERIOD
Figure 11-5. Period Register
11
10
9
8
WIDTH
Figure 11-6. Width Register
11
10
9
8
COUNT
Figure 11-7. Counter Register
010 = Divide by 8
101 = Divide by 64
7
6
5
4
7
6
5
4
7
6
5
4
3
2
1
0
Reset Value: 0000
3
2
1
0
Reset Value: 0000
3
2
1
0
Reset Value: 0000
MOTOROLA

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents