MODE SETTING ....................................................................................... 157
8.1
Mode Setting ................................................................................................................................... 158
8.2
Mode Pins (MD2 to MD0) ............................................................................................................... 159
8.3
Mode Data ...................................................................................................................................... 160
I/O PORT .................................................................................................. 163
9.1
Overview of I/O Port ....................................................................................................................... 164
9.2
Registers of I/O Port ....................................................................................................................... 166
9.3
Port 0 .............................................................................................................................................. 167
9.3.1
9.3.2
Operation of Port 0 .................................................................................................................... 171
9.4
Port 1 .............................................................................................................................................. 173
9.4.1
9.4.2
Operation of Port 1 .................................................................................................................... 176
9.5
Port 2 .............................................................................................................................................. 178
9.5.1
9.5.2
Operation of Port 2 .................................................................................................................... 181
9.6
Port 3 .............................................................................................................................................. 183
9.6.1
9.6.2
Operation of Port 3 .................................................................................................................... 186
9.7
Port 4 .............................................................................................................................................. 188
9.7.1
9.7.2
Operation of Port 4 .................................................................................................................... 191
9.8
Port 5 .............................................................................................................................................. 193
9.8.1
9.8.2
Operation of Port 5 .................................................................................................................... 196
9.9
Port 6 .............................................................................................................................................. 198
9.9.1
9.9.2
Operation of Port 6 .................................................................................................................... 201
9.10
Sample I/O Port Program ............................................................................................................... 203
10.1
10.2
10.3
10.4
Time-base Timer Interrupts ............................................................................................................ 211
10.5
10.6
10.7
11.1
11.2
11.3
11.4
11.5
11.6
vii