Epson 0C88832 Technical Manual page 92

Cmos 8-bit single chip microcomputer
Table of Contents

Advertisement

5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Programmable Timer)
PLPOL: 00FF31H•D5
Selects the pulse polarity for the K10 input port
terminal.
• In event counter mode
When "1" is written: Rising edge
When "0" is written: Falling edge
Reading:
In the event counter mode, select whether the count
timing will be set at the falling edge of the external
clock (EVIN) input to the K10 input port terminal
or at the rising edge. When "0" is written to PLPOL,
the falling edge is selected and when "1" is written,
the rising edge is selected.
• In pulse width measurement mode
When "1" is written: High level pulse width
When "0" is written: LOW level pulse width
Reading:
In the pulse width measurement mode, select
whether the LOW level width of the signal (EVIN)
input to the K10 input port terminal will be meas-
ured or the HIGH level will be measured. When "0"
is written to PLPOL, the LOW level width measure-
ment is selected and when "1" is written, the HIGH
level width measurement is selected.
In the normal mode (EVCNT = FCSEL = "0"), the
setting of PLPOL becomes invalid.
At initial reset, PLPOL is set to "0".
CONT0, CONT1: 00FF31H•D2, 00FF32H•D2
Select the continuous/one-shot mode.
When "1" is written: Continuous mode
When "0" is written: One-shot mode
Reading:
Select whether timer 0 will be used in the continu-
ous mode or in the one-shot mode.
By writing "1" to CONT0, 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
continued. On the other hand, when writing "0" to
CONT0, the programmable timer is set to the one-
shot mode. The counter loads an initial value and
stops when an underflow is generated. At this time,
PRUN0 is automatically reset to "0".
In the same way, the continuous/one-shot mode
for timer 1 is selected by CONT1. (In the one-shot
mode for timer 1, PRUN1 is automatically reset to
"0" when the counter underflow is generated.)
At initial reset, this register is set to "0" (one-shot
mode).
86
Valid
measurement
measurement
Valid
Valid
RLD00–RLD07: 00FF33H
RLD10–RLD17: 00FF34H
Sets the initial value for the counter.
RLD00–RLD07:
RLD10–RLD17:
The reload data set in this register is loaded into the
respective counters and is counted down with that
as the initial value.
Reload data is loaded to the counter under two
conditions, when "1" is written to PSET0 or PSET1
and when the counter underflow automatically
loads.
At initial reset, this register is set to "FFH".
PTD00–PTD07: 00FF35H
PTD10–PTD17: 00FF36H
Data of the programmable timer can be read out.
PTD00–PTD07:
PTD10–PTD17:
These bits act as a buffer to maintain the counter
data during readout, and the data can be read as
optional timing. However, in the 16-bit mode, to
avoid a read error, (data error when a borrow from
timer 0 to timer 1 is generated in the middle of
reading PTD00–PTD07 and PTD10–PTD17),
PTD10–PTD17 latches the timer 1 counter data
according to the reading of PTD00–PTD07.
The latched status of PTD10–PTD17 is canceled
according to the readout of PTD10–PTD17 or when
0.73–1.22 msec (depends on the readout timing) has
elapsed. Therefore, in 16-bit mode, be sure to read
the counter data of PTD00–PTD07 and PTD10–
PTD17 in order.
Since these bits are exclusively for reading, the
write operation is invalid.
At initial reset, these bits are set to "FFH".
PSET0, PSET1: 00FF31H•D1, 00FF32H•D1
Presets the reload data to the counter.
When "1" is written: Preset
When "0" is written: No operation
Reading:
By writing "1" to PSET0, the reload data in PLD00–
PLD07 is preset to the counter of timer 0. When the
counter of timer 0 is preset in the RUN status, it
restarts immediately after presetting.
In the case of STOP status, the reload data that has
been preset is maintained.
No operation results when "0" is written.
In the same way, the reload data in PLD10–PLD17
is preset to the counter of timer 1 by PSET1.
When the 16-bit mode is selected, writing "1" to
PSET1 is invalid.
This bit is exclusively for writing, it always be-
comes "0" during reading.
EPSON
Reload data for Timer 0
Reload data for Timer 1
Timer 0 counter data
Timer 1 counter data
Always "0"
E0C88832/88862 TECHNICAL MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

88862

Table of Contents