
ii
EPSON
S1C88816 TECHNICAL MANUAL
CONTENTS
5.4
Input Ports (K ports) ......................................................................................................... 32
5.4.1 Configuration of input ports .................................................................................................... 32
5.4.2 Mask option ............................................................................................................................. 32
5.4.3 Interrupt function and input comparison register ................................................................... 33
5.4.4 I/O memory for input ports ...................................................................................................... 35
5.4.5 Programming note ................................................................................................................... 37
5.5
Output Ports (R ports) ...................................................................................................... 38
5.5.1 Configuration of output ports .................................................................................................. 38
5.5.2 Mask option ............................................................................................................................. 38
5.5.3 High impedance control .......................................................................................................... 38
5.5.4 DC output ................................................................................................................................ 38
5.5.5 Special output .......................................................................................................................... 38
5.5.6 I/O memory for output ports .................................................................................................... 41
5.5.7 Programming notes ................................................................................................................. 44
5.6
I/O Ports (P ports) ............................................................................................................ 45
5.6.1 Configuration of I/O ports ....................................................................................................... 45
5.6.2 Mask option ............................................................................................................................. 45
5.6.3 I/O control registers and I/O mode ......................................................................................... 46
5.6.4 I/O memory for I/O ports ........................................................................................................ 46
5.6.5 Programming note ................................................................................................................... 47
5.7
Serial Interface ................................................................................................................. 48
5.7.1 Configuration of serial interface ............................................................................................. 48
5.7.2 Mask option ............................................................................................................................. 49
5.7.3 Transfer modes ........................................................................................................................ 49
5.7.4 Clock source ............................................................................................................................ 50
5.7.5 Transmit-receive control ......................................................................................................... 51
5.7.6 Operation of clock synchronous transfer ................................................................................ 52
5.7.7 Operation of asynchronous transfer ....................................................................................... 56
5.7.8 Interrupt function .................................................................................................................... 60
5.7.9 I/O memory for serial interface ............................................................................................... 62
5.7.10 Programming notes ............................................................................................................... 66
5.8
Clock Timer ....................................................................................................................... 67
5.8.1 Configuration of clock timer ................................................................................................... 67
5.8.2 Interrupt function .................................................................................................................... 67
5.8.3 I/O memory for clock timer ..................................................................................................... 69
5.8.4 Programming notes ................................................................................................................. 71
5.9
Stopwatch Timer ............................................................................................................... 72
5.9.1 Configuration of stopwatch timer ........................................................................................... 72
5.9.2 Count up pattern ...................................................................................................................... 72
5.9.3 Interrupt function .................................................................................................................... 73
5.9.4 I/O memory for stopwatch timer ............................................................................................. 74
5.9.5 Programming notes ................................................................................................................. 76
5.10
Programmable Timer ........................................................................................................ 77
5.10.1 Configuration of programmable timer .................................................................................. 77
5.10.2 Mask option ........................................................................................................................... 77
5.10.3 Count operation and setting basic mode ............................................................................... 77
5.10.4 Setting of input clock ............................................................................................................. 79
5.10.5 Timer mode ............................................................................................................................ 79
5.10.6 Event counter mode ............................................................................................................... 80
5.10.7 Pulse width measurement timer mode ................................................................................... 80
5.10.8 Interrupt function .................................................................................................................. 81
5.10.9 Setting of TOUT output ......................................................................................................... 81
5.10.10 Transmission rate setting of serial interface ....................................................................... 82
5.10.11 I/O memory for programmable timer .................................................................................. 83
5.10.12 Programming notes ............................................................................................................. 88