English
Language : 

Z8F1680SH020SG Datasheet, PDF (115/412 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F1680 Series
Product Specification
90
Table 53. TRIGGERED ONE-SHOT Mode Initialization Example (Continued)
Register
Value Comment
T0CTL1
83H
TEN = 1 enables the timer. All other bits remain in their appropriate settings.
Note: After receiving the input trigger, Timer 0 will:
1. Count ABCDH timer clocks.
2. Upon Timer 0 reload, generate single clock cycle active High output pulse on Timer 0 Output pin.
3. Wait for next input trigger event.
9.2.3.3. CONTINUOUS Mode
In CONTINUOUS Mode, the timer counts up to the 16-bit reload value stored in the
Timer Reload High and Low Byte registers. The Timer counts timer clocks up to the 16-
bit reload value. Upon reaching the reload value, the timer generates an interrupt, the
count value in the Timer High and Low Byte registers is reset to 0001H and counting
resumes. Also, if the Timer Output alternate function is enabled, the Timer Output pin
changes state (from Low to High or High to Low) on timer reload.
Observe the following steps to configure a timer for CONTINUOUS Mode and initiate the
count:
1. Write to the Timer Control 1 Register to:
– Disable the timer
– Configure the timer for CONTINUOUS Mode
– Set the prescale value
– If using the Timer Output Alternate Function, set the initial output level (High or
Low)
2. Write to the Timer Control 2 Register to choose the timer clock source.
3. Write to the Timer Control 0 Register to set the timer interrupt-configuration field
TICONFIG.
4. Write to the Timer High and Low Byte registers to set the starting count value (usually
0001H). This value only affects the first pass in CONTINUOUS Mode. After the first
timer reload in CONTINUOUS Mode, counting always begins at the reset value of
0001H.
5. Write to the Timer Reload High and Low Byte registers to set the reload value.
6. If appropriate, enable the timer interrupt and set the timer interrupt priority by writing
to the relevant interrupt registers.
7. If using the Timer Output function, configure the associated GPIO port pin for the
Timer Output alternate function.
8. Write to the Timer Control 1 Register to enable the timer and initiate counting.
PS025015-1212
PRELIMINARY
Timers