
viii
CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 (LEVEL) ........................................ 245
11.1 Overview of External Interrupt Circuit 2 (Level) ................................................................................ 246
11.2 Configuration of External Interrupt Circuit 2 ...................................................................................... 247
11.3 Pin of External Interrupt Circuit 2 ...................................................................................................... 248
11.4 Registers of External Interrupt Circuit 2 ............................................................................................ 251
11.4.1 External Interrupt 2 Control Register (EIE2) ................................................................................ 252
11.4.2 External Interrupt 2 Flag Register (EIF2) ..................................................................................... 254
11.5 Interrupt of External Interrupt Circuit 2 .............................................................................................. 256
11.6 Explanation of Operations of External Interrupt Circuit 2 .................................................................. 257
11.7 Program Example for External Interrupt Circuit 2 ............................................................................ 259
CHAPTER 12 A/D CONVERTER ..................................................................................... 261
12.1 Overview of A/D Converter ............................................................................................................... 262
12.2 Configuration of A/D Converter ......................................................................................................... 263
12.3 Pin of A/D Converter ......................................................................................................................... 266
12.4 Registers of A/D Converter ............................................................................................................... 268
12.4.1 A/D Control Register 1 (ADC1) .................................................................................................... 269
12.4.2 A/D Control Register 2 (ADC2) .................................................................................................... 271
12.4.3 A/D Data Register (ADDH and ADDL) ......................................................................................... 273
12.4.4 A/D Enable Register (ADEN) ....................................................................................................... 274
12.5 Interrupt of A/D Converter ................................................................................................................. 275
12.6 Explanation of Operations of A/D Converter Functions .................................................................... 276
12.7 Notes on Using A/D Converter .......................................................................................................... 278
12.8 Program Example for A/D Converter ................................................................................................ 280
CHAPTER 13 UART ........................................................................................................ 283
13.1 Overview of UART ............................................................................................................................ 284
13.2 Configuration of UART ...................................................................................................................... 289
13.3 Pin of UART ...................................................................................................................................... 292
13.4 Registers of UART ............................................................................................................................ 294
13.4.1 Serial Mode Control Register (SMC) ........................................................................................... 295
13.4.2 Serial Rate Control Register (SRC) ............................................................................................. 297
13.4.3 Serial Status and Data Register (SSD) ........................................................................................ 299
13.4.4 Serial Input Data Register (SIDR) ................................................................................................ 302
13.4.5 Serial Output Data Register (SODR) ........................................................................................... 303
13.4.6 Clock Divisor Selection Clock (UPC) ........................................................................................... 304
13.4.7 Serial Switch Register (SSEL) ..................................................................................................... 306
13.5 Interrupt of UART .............................................................................................................................. 308
13.6 Explanation of Operations of Theory of UART Functions ................................................................. 309
13.6.1 Transmission Operations (Operating Mode 0, 1, 2, and 3) .......................................................... 311
13.6.2 Reception Operations (Operating Mode 0, 1, or 3) ...................................................................... 312
13.6.3 Reception Operations (Operating Mode 2 Only) .......................................................................... 314
13.7 Program Example for UART ............................................................................................................ 316
CHAPTER 14 8-BIT SERIAL I/O ..................................................................................... 319
14.1 Overview of 8-Bit Serial I/O ............................................................................................................... 320
14.2 Configuration of 8-Bit Serial I/O ........................................................................................................ 321
14.3 Pin of 8-Bit Serial I/O ........................................................................................................................ 323