
ii EPSON S1C63666 TECHNICAL MANUAL
CONTENTS
4.5 Input Ports (K00–K03 and K10–K13) .........................................................37
4.5.1 Configuration of input ports ..................................................................... 37
4.5.2 Interrupt function ...................................................................................... 37
4.5.3 Mask option ............................................................................................... 38
4.5.4 I/O memory of input ports......................................................................... 39
4.5.5 Programming notes ................................................................................... 41
4.6 Output Ports (R00–R03 and R10–R13) .......................................................42
4.6.1 Configuration of output ports ................................................................... 42
4.6.2 Mask option ............................................................................................... 42
4.6.3 High impedance control ............................................................................ 43
4.6.4 Special output ............................................................................................ 43
4.6.5 I/O memory of output ports....................................................................... 45
4.6.6 Programming notes ................................................................................... 47
4.7 I/O Ports (P00–P03 and P10–P13) ............................................................. 48
4.7.1 Configuration of I/O ports ........................................................................ 48
4.7.2 Mask option ............................................................................................... 49
4.7.3 I/O control registers and input/output mode ............................................ 49
4.7.4 Pull-down during input mode ................................................................... 49
4.7.5 I/O memory of I/O ports............................................................................ 50
4.7.6 Programming note..................................................................................... 52
4.8 LCD Driver (COM0–COM7, SEG0–SEG63) ............................................. 53
4.8.1 Configuration of LCD driver .................................................................... 53
4.8.2 Power supply for LCD driving .................................................................. 53
4.8.3 Control of LCD display and drive waveform ........................................... 53
4.8.4 Display memory......................................................................................... 58
4.8.5 Segment option .......................................................................................... 58
4.8.6 LCD contrast adjustment .......................................................................... 60
4.8.7 I/O memory of LCD driver........................................................................ 61
4.8.8 Programming note..................................................................................... 62
4.9 Clock Timer ..................................................................................................63
4.9.1 Configuration of clock timer ..................................................................... 63
4.9.2 Data reading and hold function ................................................................ 63
4.9.3 Interrupt function ...................................................................................... 64
4.9.4 I/O memory of clock timer ........................................................................ 65
4.9.5 Programming notes ................................................................................... 66
4.10 Stopwatch Timer........................................................................................... 67
4.10.1 Configuration of stopwatch timer ........................................................... 67
4.10.2 Counter and prescaler............................................................................. 67
4.10.3 Capture buffer and hold function............................................................ 68
4.10.4 Stopwatch timer RUN/STOP and reset ................................................... 69
4.10.5 Direct input function and key mask ........................................................ 69
4.10.6 Interrupt function .................................................................................... 72
4.10.7 I/O memory of stopwatch timer .............................................................. 74
4.10.8 Programming notes ................................................................................. 77
4.11 Programmable Timer ...................................................................................78
4.11.1 Configuration of programmable timer.................................................... 78
4.11.2 Basic count operation ............................................................................. 79
4.11.3 Setting the input clock ............................................................................. 80
4.11.4 Event counter mode (timer 0) ................................................................. 80
4.11.5 16-bit timer (timer 0 + timer 1) .............................................................. 81
4.11.6 Interrupt function .................................................................................... 82
4.11.7 Control of TOUT output .......................................................................... 82
4.11.8 Transfer rate setting for serial interface ................................................ 83
4.11.9 I/O memory of programmable timer ....................................................... 84
4.11.10 Programming notes ............................................................................... 89