xii
9.6
9.7
9.8
9.9
9.10 Programe Example of the 16-bit Timer/Counter ............................................................................... 250
Operation of the Interval Timer Function .......................................................................................... 244
Operation of the Counter Function .................................................................................................... 246
Status of the 16-bit Timer/Counter in Each Mode ............................................................................. 248
Notes on Using the 16-bit Timer/Counter ......................................................................................... 249
CHAPTER 10 EXTERNAL INTERRUPTS (EDGES) ....................................................... 255
10.1 Overview of the External Interrupt Circuit ......................................................................................... 256
10.2 Configuration of the External Interrupt Circuit ................................................................................... 257
10.3 Pins of the External Interrupt Circuit ................................................................................................. 258
10.4 Registers of the External Interrupt Circuit ......................................................................................... 260
10.4.1 External Interrupt Control Register (EIC1 to EIC2) ...................................................................... 261
10.5 External Interrupt Circuit Interrupts ................................................................................................... 263
10.6 Operation of the External Interrupt Circuit ........................................................................................ 264
CHAPTER 11 A/D CONVERTER ..................................................................................... 265
11.1 Overview of the A/D Converter ......................................................................................................... 266
11.2 Configuration of the A/D Converter ................................................................................................... 267
11.3 Pins of the A/D Converter ................................................................................................................. 270
11.4 Registers of the A/D Converter ......................................................................................................... 273
11.4.1 A/D Control Register 1 (ADC1) .................................................................................................... 274
11.4.2 A/D Control Register 2 (ADC2) .................................................................................................... 276
11.4.3 A/D Data Registers (ADDH, ADDL) ............................................................................................. 278
11.4.4 A/D Enable Registers 1 to 2 (ADEN 1 to 2) ................................................................................. 279
11.5 A/D Converter Interrupt ..................................................................................................................... 281
11.6 Operation of the A/D Converter ........................................................................................................ 282
11.7 Notes on Using the A/D Converter .................................................................................................... 284
11.8 Program Example of the A/D Converter ........................................................................................... 286
CHAPTER 12 D/A CONVERTER ..................................................................................... 289
12.1 Overview of the D/A Converter ......................................................................................................... 290
12.2 Configuration of the D/A Converter ................................................................................................... 291
12.3 Pins of the D/A Converter ................................................................................................................. 292
12.4 Registers of the D/A Converter ......................................................................................................... 293
12.4.1 D/A Control Register .................................................................................................................... 294
12.4.2 D/A Data Registers 1 and 2 (DADR1, 2) ...................................................................................... 295
12.5 Operation of the D/A Converter ........................................................................................................ 296
CHAPTER 13 COMPARATOR ........................................................................................ 297
13.1 Overview of the Comparator ............................................................................................................. 298
13.2 Configuration of the Comparator ....................................................................................................... 299
13.3 Pins of the Comparator ..................................................................................................................... 303
13.4 Registers of the Comparator ............................................................................................................. 306
13.4.1 Comparator Control Register 1 (COCR1) .................................................................................... 308
13.4.2 Comparator Control Register 2 (COCR2) .................................................................................... 310
13.4.3 Comparator Status Register 1 (COSR1) ...................................................................................... 312
13.4.4 Comparator Interrupt Control Register 1 (CICR1) ....................................................................... 315
13.4.5 Comparator Status Register 2 (COSR2) ...................................................................................... 317