50 EPSON S1C88650 TECHNICAL MANUAL
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Input Ports)
5.5.6 Programming notes
(1) When changing the input terminal from LOW
level to HIGH with the built-in pull-up resistor,
a delay in the waveform rise time will occur
depending on the time constant of the pull-up
resistor and the load capacitance of the
terminal. It is necessary to set an appropriate
wait time for introduction of an input port. In
particular, special attention should be paid to
key scan for key matrix formation. Make this
wait time the amount of time or more calculated
by the following expression.
Wait time = RIN x (CIN + load capacitance on the
board) x 1.6 [sec]
RIN: Pull up resistance Max. value
CIN: Terminal capacitance Max. value
(2) Be sure to disable interrupts before changing
the contents of the CTK0x register. Unnecessary
interrupts may occur if the register is changed
when the corresponding input port interrupts
have been enabled by the interrupt enable
register EK0x.