ez80f91 ZiLOG Semiconductor, ez80f91 Datasheet - Page 130

no-image

ez80f91

Manufacturer Part Number
ez80f91
Description
Ez80 Acclaimplus!? Connectivity Assp Ez80f91 Assp
Manufacturer
ZiLOG Semiconductor
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ez80f917050SBCG
Manufacturer:
Zilog
Quantity:
135
Part Number:
ez80f91AZ050EC
Manufacturer:
Zilog
Quantity:
10 000
Part Number:
ez80f91AZ050EG
Manufacturer:
Zilog
Quantity:
10 000
Part Number:
ez80f91AZ050SC
Manufacturer:
Zilog
Quantity:
10 000
Part Number:
ez80f91AZ050SG
Manufacturer:
Zilog
Quantity:
158
Part Number:
ez80f91AZ050SG
Manufacturer:
Zilog
Quantity:
10 000
Part Number:
ez80f91AZA50EG
Manufacturer:
Zilog
Quantity:
10 000
Part Number:
ez80f91NA050SG
Manufacturer:
ZILOG
Quantity:
20 000
Company:
Part Number:
ez80f91NA050SG
Quantity:
160
PS027001-0707
Basic Timer Operation
Basic timer operation is controlled by a timer control register and a programmable reload
value. The CPU uses the control register to setup the prescaling, the input clock source,
the end-of-count behavior, and to start the timer. The 16-bit reload value is used to
determine the duration of the timer’s count before either halting or reloading.
After choosing a timer period and writing the appropriate values to the reload registers, the
CPU must set the timer enable bit (TMRx_CTL[TIM_EN]) by allowing the count to
begin. The reload bit (TMRx_CTL[RLD]) must also be asserted so that the timer counts
down from the reload value rather than from
assertion of the reload bit, the timer loads with the 16-bit reload value and begins counting
down. The reload bit is automatically cleared after the loading operation. The timer is
enabled and reloaded on the same cycle; however, the timer does not require disabling to
reload and reloading is performed at any time. It is also possible to halt the timer by deas-
serting the timer enable bit and resuming the count at a later time from the same point by
reasserting the bit.
Reading the Current Count Value
The CPU reads the current count value when the timer is running. Because the count is a
16-bit value, the hardware latches the value of the upper byte into temporary storage when
the lower byte is read. This value in temporary storage is the value returned when the
upper byte is read. Therefore, the software must read the lower byte first. If it attempts to
read the upper byte first, it does not obtain the current upper byte of the count. Instead, it
obtains the last latched value. This Read operation does not affect timer operation.
Setting Timer Duration
There are three factors to consider while determining Programmable Reload Timer
duration: clock frequency, clock divider ratio, and initial count value. Minimum duration
of the timer is achieved by loading
0000h
0000h
bits of the control register, the clock is either the system clock, or an on-chip RC oscillator
output or an input from a pin.
The time-out period of the timer is returned by the following equation:
To calculate the time-out period with the above equation while using an initial value of
0000h
Time-Out Period =
, because the timer first rolls over to
, enter a reload value of 65536 (
before the end-of-count is signaled. Depending on the TMRx_CTL[CLK_SEL]
Clock Divider Ratio x Reload Value
System Clock Frequency
0001h
FFFFh
. Maximum duration is achieved by loading
FFFFh
0000h
+ 1).
and then continues counting down to
. On the system clock cycle, after the
Programmable Reload Timers
Product Specification
eZ80F91 ASSP
122

Related parts for ez80f91