Typewriter User Manual

8- 26 MC68340 USER’S MANUAL MOTOROLA
PREL1 $60C, $64C
1514131211109876543210
PR1-15 PR1-14 PR1-13 PR1-12 PR1-11 PR1-10 PR1-9 PR1-8 PR1-7 PR1-6 PR1-5 PR1-4 PR1-3 PR1-2 PR1-1 PR1-0
RESET:
1111111111111111
Supervisor/User
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 $60E, $64E
1514131211109876543210
PR2-15 PR2-14 PR2-13 PR2-12 PR2-11 PR2-10 PR2-9 PR2-8 PR2-7 PR2-6 PR2-5 PR2-4 PR2-3 PR2-2 PR2-1 PR2-0
RESET:
1111111111111111
Supervisor/User
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 $610, $650
1514131211109876543210
COM15 COM14 COM13 COM12 COM11 COM10 COM9 COM8 COM7 COM6 COM5 COM4 COM3 COM2 COM1 COM0
RESET:
0000000000000000
Supervisor/User
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.
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...