SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 142
Revision 1.93
SIO INTERRUPT OPERATION
When the SIO finished transmitting, the SIOIRQ will be set to “1” however the SIOIEN is enable or disable. If the
SIOIEN = 1, the trigger event will make the SIOIRQ to be “1” and the system enter interrupt vector. If the SIOIEN = 0,
the trigger event will make the SIOIRQ to be “1” but the system will not enter interrupt vector. Users need to care for
the operation under multi-interrupt situation.
Example: SIO interrupt request setup.
B0BSET
FSIOIEN
; Enable SIO interrupt service
B0BCLR
FSIOIRQ
;
Clear
SIO interrupt request flag
B0BSET
FGIE
; Enable GIE
Example: SIO interrupt service routine.
ORG
8
; Interrupt vector
JMP
INT_SERVICE
INT_SERVICE:
B0XCH
A,
ACCBUF
; B0XCH doesn
'
t change C, Z flag
PUSH
;
Push
B0BTS1
FSIOIRQ
; Check SIOIRQ
JMP
EXIT_INT
; SIOIRQ = 0, exit interrupt vector
B0BCLR
FSIOIRQ
; Reset SIOIRQ
.
.
; SIO interrupt service routine
. .
EXIT_INT:
POP
;
Pop
B0XCH
A, ACCBUF
; Restore ACC value.
RETI
; Exit interrupt vector