SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 70
Version 1.5
Note:
1. In RTC mode, clear T0IRQ must be after 1/2 RTC clock source (32768Hz), or the RTC interval time is
error. The delay is about 16us and use T0 interrupt service routine executing time to be the 16us
delay time.
2.
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.
> 16us
B0BTS1
FT0IRQ
; Check T0IRQ
JMP
EXIT_INT
; T0IRQ = 0, exit interrupt vector
…
; T0 interrupt service routine
…
; The time must be longer than 16us.
B0BCLR
FT0IRQ
; Reset T0IRQ
…
EXIT_INT:
…
; Pop routine to load ACC and PFLAG from buffers.
RETI
; Exit interrupt vector