9-13
TIMER/COUNTER UNIT
The timer counting from its initial count (usually zero) to its maximum count (either Maxcount
Compare A or B) and resetting to zero defines one timing cycle. A Maxcount Compare value of
0 implies a maximum count of 65536, a Maxcount Compare value of 1 implies a maximum count
of 1, etc.
Only equivalence between the Timer Count and Maxcount Compare registers is checked. The
count does not reset to zero if its value is greater than the maximum count. If the count value ex-
ceeds the Maxcount Compare value, the timer counts to 0FFFFH, increments to zero, then counts
to the value in the Maxcount Compare register. Upon reaching a maximum count value, the Max-
imum Count (MC) bit in the Timer Control register sets. The MC bit must be cleared by writing
to the Timer Control register. This is not done automatically.
The Timer/Counter Unit can be configured to execute different counting sequences. The timers
can operate in single maximum count mode (all timers) or dual maximum count mode (Timers 0
and 1 only). They can also be programmed to run continuously in either of these modes. The Al-
ternate (ALT) bit in the Timer Control register determines the counting modes used by Timers 0
and 1.
All timers can use single maximum count mode, where only Maxcount Compare A is used. The
timer will count to the value contained in Maxcount Compare A and reset to zero. Timer 2 can
operate only in this mode.
Timers 0 and 1 can also use dual maximum count mode. In this mode, Maxcount Compare A and
Maxcount Compare B are both used. The timer counts to the value contained in Maxcount Com-
pare A, resets to zero, counts to the value contained in Maxcount Compare B, and resets to zero
again. The Register In Use (RIU) bit in the Timer Control register indicates which Maxcount
Compare register is currently in use.
The timers can be programmed to run continuously in single maximum count and dual maximum
count modes. The Continuous (CONT) bit in the Timer Control register determines whether a
timer is disabled after a single counting sequence.
9.2.3.1
Retriggering
The timer input pins affect timer counting in three ways (see Table 9-2). The programming of the
External (EXT) and Retrigger (RTG) bits in the Timer Control register determines how the input
signals are used. When the timers are clocked internally, the RTG bit determines whether the in-
put pin enables timer counting or retriggers the current timing cycle.
When the EXT and RTG bits are clear, the timer counts internal timer events. In this mode, the
input is level-sensitive, not edge-sensitive. A low-to-high transition on the timer input is not re-
quired for operation. The input pin acts as an external enable. If the input is high, the timer will
count through its sequence, provided the timer remains enabled.
Summary of Contents for 80C186XL
Page 1: ...80C186XL 80C188XL Microprocessor User s Manual...
Page 2: ...80C186XL 80C188XL Microprocessor User s Manual 1995...
Page 18: ...1 Introduction...
Page 19: ......
Page 27: ......
Page 28: ...2 Overview of the 80C186 Family Architecture...
Page 29: ......
Page 79: ......
Page 80: ...3 Bus Interface Unit...
Page 81: ......
Page 127: ......
Page 128: ...4 Peripheral Control Block...
Page 129: ......
Page 137: ......
Page 138: ...5 ClockGenerationand Power Management...
Page 139: ......
Page 154: ...6 Chip Select Unit...
Page 155: ......
Page 178: ...7 Refresh Control Unit...
Page 179: ......
Page 193: ......
Page 194: ...8 Interrupt Control Unit...
Page 195: ......
Page 227: ......
Page 228: ...9 Timer Counter Unit...
Page 229: ......
Page 253: ......
Page 254: ...10 Direct Memory Access Unit...
Page 255: ......
Page 283: ......
Page 284: ...11 Math Coprocessing...
Page 285: ......
Page 302: ...12 ONCE Mode...
Page 303: ......
Page 306: ...A 80C186 Instruction Set Additions and Extensions...
Page 307: ......
Page 318: ...B Input Synchronization...
Page 319: ......
Page 322: ...C Instruction Set Descriptions...
Page 323: ......
Page 371: ......
Page 372: ...D Instruction Set Opcodes and Clock Cycles...
Page 373: ......
Page 396: ...Index...
Page 397: ......