English
Language : 

SM59R16A2 Datasheet, PDF (41/67 Pages) SyncMOS Technologies,Inc – 8-Bit Micro-controller
SM59R16A2/SM59R08A2
8-Bit Micro-controller
64KB/32KB ISP Flash & 2KB RAM embedded
11 Interrupt
SM59R16A2/SM59R08A2 provides 11 interrupt sources with four priority levels. Each source has
its own request flag located in a SFR. Each interrupt requested by the corresponding flag can be
enabled or disabled individually by the enable bits in SFR’s IEN0, IEN1, and IEN2.
When the interrupt occurs, the CPU will vector to the predetermined address as shown in Table 11-1.
Once interrupt service has begun, it can be interrupted only by a higher priority interrupt. The
interrupt service is terminated by a return from instruction RETI. When an RETI is performed, the
processor will return to the instruction that would have been the next instruction when the interrupt
occurred.
When the interrupt condition occurs, the processor will also indicate this by setting a flag bit. This bit
is set regardless of whether the interrupt is enabled or disabled. Each interrupt flag is sampled once
per machine cycle, then samples are polled by hardware. If the sample indicates a pending
interrupt when the interrupt is enabled, then interrupt request flag is set. On the next instruction
cycle, the interrupt will be acknowledged by hardware, forcing an LCALL to appropriate vector
address.
Interrupt response will require a varying amount of time depending on the state of the processor
when the interrupt occurs. If the processor is performing an interrupt service with equal or greater
priority, the new interrupt will not be invoked. In the other cases, the response time depends on
current instruction. The fastest possible response to an interrupt is 7 machine cycles. This includes
one machine cycle for detecting the interrupt and six cycles for perform the LCALL.
Table 11-1: Interrupt vectors
Interrupt Request Flags
Interrupt Vector
Address
IE0 – External interrupt 0
0003h
TF0 – Timer 0 interrupt
000Bh
IE1 – External interrupt 1
0013h
TF1 – Timer 1 interrupt
001Bh
RI0/TI0 – Serial channel 0 interrupt
0023h
TF2/EXF2 – Timer 2 interrupt
002Bh
SPIIF – SPI interrupt
004Bh
ADCIF – A/D converter interrupt
0053h
EEIIF – Expanded External Interrupt
005Bh
IICIF – IIC interrupt
006Bh
RI1/TI1 – Serial channel 1 interrupt
0083h
Interrupt Number
*(use Keil C Tool)
0
1
2
3
4
5
9
10
11
13
16
*See Keil C about C51 User’s Guide about Interrupt Function description
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M034
41
Ver.B SM59R16A2/SM59R08A2 06/2009