![](http://datasheet.mmic.net.cn/380000/-PD784214Y_datasheet_16744924/-PD784214Y_18.png)
18
CHAPTER 21 BUZZER OUTPUT FUNCTIONS ............................................................................... 391
21.1
21.2
21.3
Function ................................................................................................................................. 391
Structure ................................................................................................................................ 391
Control Registers .................................................................................................................. 392
CHAPTER 22 EDGE DETECTION FUNCTION................................................................................ 395
22.1
22.2
Control Registers .................................................................................................................. 395
Edge Detection of P00 to P06............................................................................................... 396
CHAPTER 23 INTERRUPT FUNCTIONS......................................................................................... 397
23.1
Interrupt Request Sources ................................................................................................... 398
23.1.1
Software Interrupts .................................................................................................................... 400
23.1.2
Operand Error Interrupts............................................................................................................ 400
23.1.3
Non-Maskable Interrupts ........................................................................................................... 400
23.1.4
Maskable Interrupts ................................................................................................................... 400
Interrupt Service Modes ....................................................................................................... 401
23.2.1
Vectored Interrupt Service ......................................................................................................... 401
23.2.2
Macro Service ............................................................................................................................ 401
23.2.3
Context Switching ...................................................................................................................... 401
Interrupt Processing Control Registers .............................................................................. 402
23.3.1
Interrupt Control Registers......................................................................................................... 404
23.3.2
Interrupt mask registers (MK0, MK1) ......................................................................................... 408
23.3.3
In-service priority register (ISPR)............................................................................................... 410
23.3.4
Interrupt mode control register (IMC)......................................................................................... 411
23.3.5
Watchdog timer mode register (WDM) ...................................................................................... 412
23.3.6
Interrupt Selection Control Register (SNMI) .............................................................................. 413
23.3.7
Program status word (PSW) ...................................................................................................... 414
Software Interrupt Acknowledgment Operations ............................................................... 415
23.4.1
BRK instruction software interrupt acknowledgment operation ................................................. 415
23.4.2
BRKCS instruction software interrupt (software context switching) acknowledgment operation ... 415
Operand Error Interrupt Acknovwedgment Operation....................................................... 416
Non-maskable Interrupt Acknowledgment Operation........................................................ 417
Maskable Interrupt Acknowledgment Operation ................................................................ 421
23.7.1
Vectored Interruption ................................................................................................................. 423
23.7.2
Context Switching ...................................................................................................................... 423
23.7.3
Maskable Interrupt Priority Levels ............................................................................................. 425
MACRO SERVICE FUNCTION............................................................................................. 431
23.8.1
Outline of Macro Service Function............................................................................................. 431
23.8.2
Types of Macro Service ............................................................................................................. 431
23.8.3
Basic Macro Service Operation ................................................................................................. 434
23.8.4
Operation at End of Macro Service............................................................................................ 435
23.8.5
Macro Service Control Registers ............................................................................................... 438
23.8.6
Macro Service Type A ................................................................................................................ 442
23.8.7
Macro Service Type B................................................................................................................ 447
23.8.8
Macro Service Type C................................................................................................................ 452
23.8.9
Counter Mode ............................................................................................................................ 466
23.2
23.3
23.4
23.5
23.6
23.7
23.8