Epson 0C88832 Technical Manual page 84

Cmos 8-bit single chip microcomputer
Table of Contents

Advertisement

5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Programmable Timer)
PRUN0(1)
PSET0(1)
RLD00–07(10–17)
Input clock
PTD07(17)
PTD06(16)
PTD05(15)
PTD04(14)
PTD03(13)
PTD02(12)
PTD01(11)
PTD00(10)
The registers PRUN0 (timer 0) and PRUN1 (timer 1)
are provided to control the RUN/STOP for timers 0
and 1.
After the reload data has been preset into the
counter, down-counting is begun by writing "1" to
this register. When "0" is written, the clock input is
prohibited and the count stops.
The control of this RUN/STOP has no affect on the
counter data. The counter data is maintained even
during the stoppage of the counter and it can start
the count, continuing from that data.
The reading of the counter data can be done
through the data buffers PTD00–PTD07 (timer 0)
and PTD10–PTD17 (timer 1) with optional timing.
When the down-counting has progressed and an
underflow is generated, the counter reloads the
initial value set in the reload data register.
This underflow signal controls an interrupt genera-
tion, pulse (TOUT signal) output and serial inter-
face clocking, in addition to reloading the counter.
78
A6H
Preset
Fig. 5.10.2.1 Basic operation timing of the counter
EPSON
Continuous/one-shot mode setting
By writing "1" to the continuous/one-shot mode
selection registers CONT0 (timer 0) and CONT1
(timer 1), the programmable timer is set to the
continuous mode. In the continuous mode, the
initial counter value is automatically loaded when
an underflow is generated, and counting is contin-
ued. This mode is suitable when programmable
intervals are necessary (such as an interrupt and a
synchronous clock for the serial interface).
On the other hand, when writing "0" to the registers
CONT0 (timer 0) and CONT1 (timer 1), the pro-
grammable timer is set to the one-shot mode. The
counter loads an initial value and stops when an
underflow is generated. At this time, the RUN/
STOP control register PRUN0 (timer 0) and PRUN1
(timer 1) are automatically reset to "0". After the
counter stops, a one-shot count can be performed
once again by writing "1" to registers PRUN0 (timer
0) and PRUN1 (timer 1). This mode is suitable for
single time measurement, for example.
Input clock
Continuous
03H 02H 01H 00H A6H A5H A4H
mode
Count
data
One-shot
03H 02H 01H 00H
mode
When "A6H" is set into reload data register RLD.
Fig. 5.10.2.2 Continuous mode and one-shot mode
E0C88832/88862 TECHNICAL MANUAL
F3H
Reload and
interrupt generation
A6H
Underflow

Advertisement

Table of Contents
loading

This manual is also suitable for:

88862

Table of Contents