ii
EPSON
S1C63358 TECHNICAL MANUAL
CONTENTS
4.5
Input Ports (K00–K03, K10–K13 and K20) ................................................ 35
4.5.1 Configuration of input ports ..................................................................... 35
4.5.2 Interrupt function ...................................................................................... 36
4.5.3 Mask option ............................................................................................... 37
4.5.4 I/O memory of input ports ......................................................................... 38
4.5.5 Programming notes ................................................................................... 41
4.6
Output Ports (R00–R03, R10–R13 and R20–R23) ...................................... 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, P10–P13, P20–P23, P30–P33 and P40–P43) .......... 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-up during input mode ........................................................................ 49
4.7.5 I/O memory of I/O ports ............................................................................ 50
4.7.6 Programming note ..................................................................................... 53
4.8
LCD Driver (COM0–COM3, SEG0–SEG31) ............................................. 54
4.8.1 Configuration of LCD driver .................................................................... 54
4.8.2 Power supply for LCD driving .................................................................. 54
4.8.3 Control of LCD display and drive waveform ........................................... 54
4.8.4 Mask option ............................................................................................... 60
4.8.5 I/O memory of LCD driver ........................................................................ 62
4.8.6 Programming notes ................................................................................... 63
4.9
Clock Timer .................................................................................................. 64
4.9.1 Configuration of clock timer ..................................................................... 64
4.9.2 Data reading and hold function ................................................................ 64
4.9.3 Interrupt function ...................................................................................... 65
4.9.4 I/O memory of clock timer ........................................................................ 66
4.9.5 Programming notes ................................................................................... 68
4.10 A/D Converter .............................................................................................. 69
4.10.1 Characteristics and configuration of A/D converter .............................. 69
4.10.2 Terminal configuration of A/D converter ................................................ 69
4.10.3 Mask option ............................................................................................. 70
4.10.4 Control of A/D converter ......................................................................... 70
4.10.5 Interrupt function .................................................................................... 72
4.10.6 I/O memory of A/D converter .................................................................. 73
4.10.7 Programming notes ................................................................................. 75
4.11 Programmable Timer ................................................................................... 76
4.11.1 Configuration of programmable timer .................................................... 76
4.11.2 Tow separate 8-bit timer (MODE16 = "0") operation ........................... 77
4.11.2.1 Setting of initial value and counting down .............................. 77
4.11.2.2 Counter mode ............................................................................ 78
4.11.2.3 Setting of input clock in timer mode ......................................... 79
4.11.2.4 Interrupt function ...................................................................... 80
4.11.2.5 Setting of TOUT output ............................................................. 80
4.11.2.6 Transfer rate setting for serial interface .................................. 81
4.11.3 One channel
×
16-bit timer (MODE16 = "1") operation ...................... 81
4.11.3.1 Setting of initial value and counting down .............................. 81
4.11.3.2 Counter mode ............................................................................ 82
4.11.3.3 Setting of input clock in timer mode ......................................... 83
4.11.3.4 Interrupt function ...................................................................... 84
4.11.3.5 Setting of TOUT output ............................................................. 84
4.11.3.6 Transfer rate setting for serial interface .................................. 85