EasyManua.ls Logo

SONIX SN8P2511 - Page 57

SONIX SN8P2511
93 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SN8P2511
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 57 Version 1.2
Note: In RTC mode, don’t reset T0C in interrupt service routine.
Example: T0 interrupt service routine with RTC function.
ORG
8
; Interrupt vector
JMP
INT_SERVICE
INT_SERVICE:
…
; Push routine to save ACC and PFLAG to buffers.
B0BTS1
FT0IRQ
; Check T0IRQ
JMP
EXIT_INT
; T0IRQ = 0, exit interrupt vector
…
; T0 interrupt service routine
…
B0BCLR
FT0IRQ
; Reset T0IRQ
…
EXIT_INT:
…
; Pop routine to load ACC and PFLAG from buffers.
RETI
; Exit interrupt vector
Note: We strongly recommend to clear T0IRQ must be used b0bclr or bclr instructions.

Table of Contents