viii
CHAPTER 10 EXTERNAL INTERRUPT CIRCUIT 1 (EDGE) ......................................... 225
10.1 Overview of External Interrupt Circuit 1 .......................................................................................... 226
10.2 Configuration of External Interrupt Circuit 1 .................................................................................... 227
10.3 Pins of External Interrupt Circuit 1 .................................................................................................. 229
10.4 Registers of External Interrupt Circuit 1 .......................................................................................... 231
10.4.1 External Interrupt Control Register 1 (EIC1) .............................................................................. 232
10.4.2 External Interrupt Control Register 2 (EIC2) .............................................................................. 235
10.5 Interrupt of External Interrupt Circuit 1 ............................................................................................ 237
10.6 Operations of External Interrupt Circuit 1 ....................................................................................... 239
10.7 Program Example for External Interrupt Circuit 1 ........................................................................... 241
CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 (LEVEL) ....................................... 243
11.1 Overview of External Interrupt Circuit 2 .......................................................................................... 244
11.2 Configuration of External Interrupt Circuit 2 .................................................................................... 245
11.3 Pins of External Interrupt Circuit 2 .................................................................................................. 246
11.4 Registers of External Interrupt Circuit 2 .......................................................................................... 249
11.4.1 External Interrupt 2 Control Register (EIE2) .............................................................................. 250
11.4.2 External Interrupt 2 Flag Register (EIF2) ................................................................................... 252
11.5 Interrupt of External Interrupt Circuit 2 ............................................................................................ 253
11.6 Operations of External Interrupt Circuit 2 ....................................................................................... 254
11.7 Program Example for External Interrupt Circuit 2 ........................................................................... 256
CHAPTER 12 A/D CONVERTER .................................................................................... 259
12.1 Overview of A/D Converter ............................................................................................................. 260
12.2 Configuration of A/D Converter ....................................................................................................... 261
12.3 Pins of A/D Converter ..................................................................................................................... 263
12.4 Registers of A/D Converter ............................................................................................................. 265
12.4.1 A/D Control Register 1 (ADC1) .................................................................................................. 266
12.4.2 A/D Control Register 2 (ADC2) .................................................................................................. 268
12.4.3 A/D Data Register (ADDH and ADDL) ...................................................................................... 270
12.4.4 A/D Enable Register (ADEN) ..................................................................................................... 271
12.5 Interrupt of A/D Converter ............................................................................................................... 272
12.6 Operations of A/D Converter Functions .......................................................................................... 273
12.7 Notes on Using A/D Converter ....................................................................................................... 275
12.8 Program Example for A/D Converter .............................................................................................. 277
CHAPTER 13 UART ........................................................................................................ 279
13.1 Overview of UART .......................................................................................................................... 280
13.2 Configuration of UART .................................................................................................................... 284
13.3 Pins of UART .................................................................................................................................. 287
13.4 Registers of UART .......................................................................................................................... 289
13.4.1 Serial Mode Control Register (SMC) ......................................................................................... 290
13.4.2 Serial Rate Control Register (SRC) ........................................................................................... 292
13.4.3 Serial Status and Data Register (SSD) ..................................................................................... 294
13.4.4 Serial Input Data Register (SIDR) ............................................................................................. 297
13.4.5 Serial Output Data Register (SODR) ......................................................................................... 298
13.4.6 Clock Divider Selection Register (UPC) .................................................................................... 299