
ii
EPSON
S1C6P366 TECHNICAL MANUAL
CONTENTS
4.5
Output Ports (R00–R03, R10–R13 and R20–R23) ...................................... 34
4.5.1 Configuration of output ports ................................................................... 34
4.5.2 Mask option ............................................................................................... 34
4.5.3 High impedance control ............................................................................ 35
4.5.4 Special output ............................................................................................ 35
4.5.5 I/O memory of output ports ....................................................................... 37
4.5.6 Programming notes ................................................................................... 39
4.6
I/O Ports (P00–P03, P10–P13, P20–P23, P30–P33 and P40–P43) .......... 40
4.6.1 Configuration of I/O ports ........................................................................ 40
4.6.2 Mask option ............................................................................................... 40
4.6.3 I/O control registers and input/output mode ............................................ 41
4.6.4 Pull-up during input mode ........................................................................ 41
4.6.5 I/O memory of I/O ports ............................................................................ 42
4.6.6 Programming note ..................................................................................... 45
4.7
LCD Driver (COM0–COM3, SEG0–SEG31) ............................................. 46
4.7.1 Configuration of LCD driver .................................................................... 46
4.7.2 Power supply for LCD driving .................................................................. 46
4.7.3 Control of LCD display and drive waveform ........................................... 46
4.7.4 Segment option .......................................................................................... 50
4.7.5 Mask option ............................................................................................... 51
4.7.6 I/O memory of LCD driver ........................................................................ 52
4.7.7 Programming notes ................................................................................... 53
4.8
Clock Timer .................................................................................................. 54
4.8.1 Configuration of clock timer ..................................................................... 54
4.8.2 Data reading and hold function ................................................................ 54
4.8.3 Interrupt function ...................................................................................... 55
4.8.4 I/O memory of clock timer ........................................................................ 56
4.8.5 Programming notes ................................................................................... 57
4.9
Programmable Timer ................................................................................... 58
4.9.1 Configuration of programmable timer ...................................................... 58
4.9.2 Tow separate 8-bit timer (MODE16 = "0") operation ............................. 59
4.9.2.1 Setting of initial value and counting down ................................ 59
4.9.2.2 Counter mode .............................................................................. 60
4.9.2.3 Setting of input clock in timer mode ........................................... 61
4.9.2.4 Interrupt function ........................................................................ 62
4.9.2.5 Setting of TOUT output ............................................................... 62
4.9.2.6 Transfer rate setting for serial interface .................................... 63
4.9.3 One channel
× 16-bit timer (MODE16 = "1") operation ........................ 63
4.9.3.1 Setting of initial value and counting down ................................ 63
4.9.3.2 Counter mode .............................................................................. 64
4.9.3.3 Setting of input clock in timer mode ........................................... 65
4.9.3.4 Interrupt function ........................................................................ 66
4.9.3.5 Setting of TOUT output ............................................................... 66
4.9.3.6 Transfer rate setting for serial interface .................................... 67
4.9.4 I/O memory of programmable timer ......................................................... 68
4.9.5 Programming notes ................................................................................... 73
4.10 Serial Interface (SIN, SOUT, SCLK, SRDY) ................................................ 74
4.10.1 Configuration of serial interface ............................................................ 74
4.10.2 Mask option ............................................................................................. 75
4.10.3 Master mode and slave mode of serial interface .................................... 75
4.10.4 Data input/output and interrupt function ............................................... 76
4.10.5 I/O memory of serial interface ................................................................ 78
4.10.6 Programming notes ................................................................................. 81
4.11 A/D Converter .............................................................................................. 82
4.11.1 Characteristics and configuration of A/D converter .............................. 82
4.11.2 Terminal configuration of A/D converter ................................................ 82