8-Bit Timer Interrupt - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

12.9 8-bit Timer Interrupt

The 8-bit timer outputs an interrupt request signal to the interrupt controller (ITC) when the counter underflows.
To generate a timer underflow interrupt, set up the interrupt level and enable the interrupt using the ITC registers.
ITC registers for timer interrupts
The following shows the control bits of the ITC provided for the 8-bit timer:
Interrupt flag IIFT0
∗ IIFT0: 8-bit Timer Interrupt Flag in the Interrupt Flag (ITC_IFLG) Register (D8/0x4300)
Interrupt enable bit IIEN0
∗ IIEN0: 8-bit Timer Interrupt Enable Bit in the Interrupt Enable (ITC_EN) Register (D8/0x4302)
Interrupt level setup bits IILV0
∗ IILV0[2:0]: 8-bit Timer Interrupt Level Bits in the Internal Interrupt Level Setup (ITC_ILV0) Register 0
(D[2:0]/0x430e)
When an underflow occurs in the timer, the corresponding interrupt flag is set to 1.
If the interrupt enable bit corresponding to that interrupt flag has been set to 1, the ITC sends an interrupt
request to the S1C17 Core. To disable the timer interrupt, set the interrupt enable bit to 0.
The interrupt flag is always set to 1 by the timer underflow pulse, regardless of how the interrupt enable bit is
set (even when set to 0).
The interrupt level setup bits set the interrupt level (0 to 7) of the timer interrupt.
An interrupt request to the S1C17 Core is accepted only when all the conditions described below are met.
• The interrupt enable bit is set to 1.
• The IE (Interrupt Enable) bit of the PSR (Processor Status Register) in the S1C17 Core is set to 1.
• The timer interrupt has a higher interrupt level than the value that is set in the IL field of the PSR.
• No other cause of interrupt having higher priority, such as NMI, has occurred.
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred,
see Chapter 6, "Interrupt Controller (ITC)."
Interrupt vector
The following shows the vector number and vector address for the timer interrupt:
Vector number: 12 (0x0c)
Vector address: 0x8030
S1C17704 TECHNICAL MANUAL
EPSON
12 8-BIT TIMER (T8F)
12-9

Advertisement

Table of Contents
loading

Table of Contents