E0C6006 TECHNICAL MANUAL
EPSON
15
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Input Ports)
4.4 Input Ports (K00–K03, K10–K13)
4.4.1 Configuration of input port
The E0C6006 has two 4-bit general-purpose input ports (K00–K03 and K10–K13). As shown in Figure
4.4.1.1, each input port terminal is provided with a pull-up and a feedback pull-up so that the port is
suitable for push switch or key matrix switch input. As the pull-up can be removed by using mask
option, the input port can also be used for slide switch input or interface with another LSI.
V
DD
K
Data bus
Input
control
V
Interrupt
request
Mask option
SS
nm
Fig. 4.4.1.1 Configuration of input port
Input port data can be read on a 4-bit basis (K00–K03, K10–K13) addressed 0FAH and 0FBH.
4.4.2 Interrupt function
All input port bits (K00–K03, K10–K13) provide the interrupt function.
The interrupt mask registers (EIK0, EIK1) enable the interrupt mask to be selected individually for K0
and K1 terminal groups. An interrupt occurs at the falling edge of an input signal which is not masked
and the interrupt factor flags (IK0, IK1) is set to "1".
Input interrupt programming related precautions
Factor flag
is set
Not set
Mask register
➀
K port input
Active status
When the content of the mask register is rewritten, while the port K input is in the active status.
The input interrupt factor flag is set at
➀
.
Fig. 4.4.2.1 Input interrupt timing
When using an input interrupt, if you rewrite the content of the mask register, when the value of the
input terminal which becomes the interrupt input is in the active status (input terminal = low status), the
factor flag for input interrupt may be set.
For example, a factor flag is set with the timing of
➀
shown in Figure 4.4.2.1. However, when clearing the
content of the mask register with the input terminal kept in the low status and then setting it, the factor
flag of the input interrupt is again set at the timing that has been set.
Consequently, when the input terminal is in the active status (low status), do not rewrite the mask
register (clearing, then setting the mask register), so that a factor flag will only set at the falling edge in
this case. When clearing, then setting the mask register, set the mask register, when the input terminal is
not in the active status (high status).