S1C63406/408 TECHNICAL MANUAL
EPSON
35
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Input Ports)
4.4.5 Programming notes
(1) When input ports are changed from low to high by pull-up resistors, the rise of the waveform is
delayed on account of the time constant of the pull-up resistor and input gate capacitance. Hence,
when fetching input ports, set an appropriate waiting time.
Particular care needs to be taken of the key scan during key matrix configuration.
Make this waiting time the amount of time or more calculated by the following expression.
10
× C × R
C: terminal capacitance 5 pF + parasitic capacitance ? pF
R: pull-up resistance 300 k
(2) Be sure to turn the noise rejector OFF before executing the SLP instruction.
(3) Reactivating from SLEEP status can only be done by generation of an input interrupt factor. Therefore
when using the SLEEP function, it is necessary to set the interrupt selection register (SIK0x = "1") of
the port to be used for releasing SLEEP status before executing the SLP instruction. Furthermore,
enable the input port interrupt using the corresponding interrupt mask register (EIK0x = "1") before
executing the SLP instruction to run input interrupt handler routine after SLEEP status is released.
(4) Each input port (K00–K03) has a different interrupt factor, thus the input interrupt is controlled
individually. Be aware that this interrupt configuration is different from that of the previous models.
(5) The K03 terminal functions as the clock input terminal for the programmable timer, and the input
signal is shared with the input port and the programmable timer. Therefore, when the K03 terminal is
set to the clock input terminal for the programmable timer, take care of the interrupt setting.
(6) After an interrupt occurs, the same interrupt will occur again if the interrupt enabled state (I flag =
"1") is set or the RETI instruction is executed unless the interrupt factor flag is reset. Therefore, be sure
to reset (write "1" to) the interrupt factor flag in the interrupt service routine before shifting to the
interrupt enabled state.