Motorola MC68VZ328 Manuale Utente

Pagina di 376
General-Purpose Timers
12-1
Chapter 12
General-Purpose Timers
This chapter describes in detail the operation of the general-purpose timer modules of the MC68VZ328. 
The GP timers consist of two general-purpose 16-bit timers, a prescaler, and compare and capture 
registers. Each timer counter value can be captured using an external event and can be configured to trigger 
a capture event on either the leading or trailing edges of an input pulse. The timer can also generate an 
interrupt when the timer reaches a programmed value. Each timer has an 8-bit prescaler providing a 
programmable clock frequency derived from SYSCLK. The two timers may also be cascaded together to 
operate as a single 32-bit timer.
12.1   
GP Timer Overview
The two 16-bit timers (Timer 1 and Timer 2) that make up the general-purpose timers are identical. 
Figure 12-1 illustrates the general-purpose timer block diagram. The following sections describe the 
operation of the GP timers in detail.
Figure 12-1.   General-Purpose Timer Block Diagram
Prescaler1
÷ 16
Output
Logic
TIN
TIMER1IRQ
Edge
SYSCLK
Detect
Counter1
Compare1
Capture1
Capture2
Counter2
Compare2
Output
Logic
System
T[1:0]
PCR
Control
TIMER2IRQ
TOUT/TIN
SYSCLK
CLK32
Prescaler2
÷ 16
CLK32
SYSCLK
SYSCLK
TOUT/TIN
PCLK
PCLK
TIN
TIN
MUX
TOUT
MUX