English
Language : 

EZ80F91MCU Datasheet, PDF (152/396 Pages) Zilog, Inc. – eZ80Acclaim-TM Flash Microcontrollers
eZ80F91 MCU
Product Specification
133
Specialty Timer Modes
The features described above are common to all timers in the eZ80F91 device. In
addition to these common features, some of the timers have additional functional-
ity. The following is a list of the special features for each timer.
• Timer 0
– no special functions
• Timer 1
– 1 event counter (EC0)
– 2 input captures (IC0 and IC1)
• Timer 2
– 1 event counter (EC1)
• Timer 3
– 2 input captures (IC2 and IC3)
– 4 output compares (OC0, OC1, OC2, and OC3)
– 4 PWM outputs (PWM0, PWM1, PWM2, and PWM3)
Timer 3 contains three specialty modes. Each of these modes is enabled using
bits in their respective control registers (TMR3_CAP_CTL, TMR3_OC_CTL1,
TMR3_PWM_CTL1). When PWM mode is enabled, the OUTPUT COMPARE and
INPUT CAPTURE modes are not available. This instance is due to address space
sharing requirements. However, INPUT CAPTURE and OUTPUT COMPARE
modes can run concurrently.
Timers with specialty modes offer multiple ways to generate an interrupt. When
the interrupt controller services a timer interrupt, the firmware must read the
timer’s interrupt identification register (TMRx_IIR) to determine the cause, or
causes, for an interrupt request. This register is cleared each time it is read, allow-
ing subsequent events to be identified without interference from prior events.
Event Counter
When a timer is configured to take its input from a port input pin (ECx), it functions
as an event counter. For event counting, the clock prescaler is automatically
bypassed and edges (events) cause the timer to decrement. The user must select
the rising or the falling edge for counting. Also, the port pins must be configured as
inputs.
Input sampling on the port pins results in the counter being updated on the third
rising edge of the system clock after the edge event occurs at the port pin. Due to
the sampling, the frequency of the event input is limited to one-half the system
PS019209-0504
PRELIMINARY
Programmable Reload Timers