Preload 2 Register (Prel2); Compare Register (Com) - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

PREL1
15
14
13
12
PR1-15 PR1-14 PR1-13 PR1-12 PR1-11 PR1-10
RESET:
1
1
1
1
For some modes of operation, this register is also used to reload the counter one falling
clock edge after a timeout occurs. Refer to 8.3 Operating Modes for more information on
the individual modes.

8.4.7 Preload 2 Register (PREL2)

PREL2 is used in addition to PREL1 in the variable duty-cycle square-wave generator and
variable-width single-shot pulse generator modes. When in either of these modes, the
value in PREL1 is loaded into the counter on the first falling edge of the counter clock after
the counter is enabled. After timeout, the value in PREL2 is loaded into the counter. This
register can be be read and written when the timer module is enabled (i.e., the STP bit in
the MCR is cleared). However, a write to this register must be completed before timeout
for the new value to be reliably loaded into the counter.
PREL2
15
14
13
12
PR2-15 PR2-14 PR2-13 PR2-12 PR2-11 PR2-10
RESET:
1
1
1
1

8.4.8 Compare Register (COM)

The COM can be used in any mode. When the 16-bit counter reaches the value in the
COM, the TC and COM bits in the SR are set. In the input capture/output compare mode,
a compare event can be programmed to set, clear, or toggle TOUTx. The register can be
be read and written when the timer module is enabled (i.e., the STP bit in the MCR is
cleared).
COM
15
14
13
12
COM15 COM14 COM13 COM12 COM11 COM10
RESET:
0
0
0
0
The COM can be used to produce an interrupt when the SR TC bit has been enabled to
produce an interrupt and the counter counts down to a preselected value. The COM can
also be used to indicate that the timer is approaching timeout.
8-26
Freescale Semiconductor, Inc.
11
10
9
8
PR1-9
PR1-8
1
1
1
1
11
10
9
8
PR2-9
PR2-8
1
1
1
1
11
10
9
8
COM9
COM8
0
0
0
0
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
7
6
5
4
PR1-7
PR1-6
PR1-5
PR1-4
1
1
1
1
7
6
5
4
PR2-7
PR2-6
PR2-5
PR2-4
1
1
1
1
7
6
5
4
COM7
COM6
COM5
COM4
0
0
0
0
$60C, $64C
3
2
1
0
PR1-3
PR1-2
PR1-1
PR1-0
1
1
1
1
Supervisor/User
$60E, $64E
3
2
1
0
PR2-3
PR2-2
PR2-1
PR2-0
1
1
1
1
Supervisor/User
$610, $650
3
2
1
0
COM3
COM2
COM1
COM0
0
0
0
0
Supervisor/User
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents