eZ80L92 MCU
Product Specification
77
Programmable Reload Timers
The ZLP12840 MCU features six Programmable Reload Timers (PRT). Each PRT con-
tains a 16-bit downcounter and a 16-bit reload register. In addition, each PRT features a
clock prescaler with four selectable taps for CLK ÷ 4, CLK ÷ 16, CLK ÷ 64, and
CLK ÷ 256. Each timer can be individually enabled to operate in either SINGLE PASS or
CONTINUOUS mode. The timer can be programmed to start, stop, restart from the
current value, or restart from the initial value, and generate interrupts to the CPU.
Four of the Programmable Reload Timers (timers 0–3) feature a selectable clock source
input. The input for these timers can be either the system clock or the Real-Time Clock
(RTC) source. Timers 0–3 can also be used for event counting, with their inputs received
from a GPIO port pin. Output from timers 4 and 5 can be directed to a GPIO port pin.
Each of the six PRTs available on the ZLP12840 can be controlled individually. They do
not share the same counters, reload registers, control registers, or interrupt signals.
A simplified block diagram of a programmable reload timer is illustrated in Figure 18.
Data[7:0]
Data[7:0]
Reload Registers
{TMRx_RR_H, TMRx_RR_L}
Control Register
TMRx_CTL
System Clock
RTC Source
GPIO Pin
IRQ to eZ80 CPU
Timer Out
Adjustable
Clock
Prescaler
16-Bit
Down Counter
PRT
Control Logic
2
2
Data Registers
{TMRx_DR_H, TMRx_DR_L}
TOUT_EN
(Timers 4—5 only)
TMRx_IN TMRx_CTL[3:2]
(Timers 0—3
only)
Data[7:0]
Figure 18. Programmable Reload Timer Block Diagram
Programmable Reload Timer Operation
Setting Timer Duration
There are three factors to consider when determining Programmable Reload Timer
duration—clock frequency, clock divider ratio, and initial count value. Minimum duration
PS013015-0316
Programmable Reload Timers