EM6605 EM Microelectronic, EM6605 Datasheet - Page 19

no-image

EM6605

Manufacturer Part Number
EM6605
Description
4 bit Microcontroller
Manufacturer
EM Microelectronic
Datasheet
9. Interrupt Controller
The EM6605 has six different interrupt sources, each of which is maskable. These are:
For an interrupt to the CPU to be generated, the interrupt request flag must be set (INTxx), and the
corresponding mask register bit must be set to 1 (Mxx), the general interrupt enable flag (INTEN) must
also be set to 1. The interrupt request can be masked by the corresponding interrupt mask registers
MPortx for each input interrupt and by PSF0 ,PSF1 and MTim for internal interrupts. At initial reset the
interrupt mask bits are set to 0. INTEN bit is set automatically to 1 by Halt Instruction except when starting
the Automatic SWB transfer (see Serial Write Buffer (SWB) chapter 11)
The CPU is interrupted when one of the interrupt request flags is set to 1 in register IntRq and the INTEN
bit is enabled in the control register CIRQD. INTTE and INTPR flags are cleared automatically after a read
of the IntRq register. The other two interrupt flags INTPA (IRQ from PortA) and INTPC (IRQ from PortC) in
IntRq register are cleared only after reading the corresponding Port interrupt request registers IRQpA and
IRQpC. At the Power on reset and in SLEEP mode the INTEN bit is also set to 0 therefore not allowing any
interrupt requests to the CPU until it is set to 1 by software.
Since the CPU has only one interrupt subroutine and because the IntRq register is cleared after reading,
the CPU does not miss any of the interrupt requests which come during the interrupt service routine. If any
occur during this time a new interrupt will be generated as soon as the CPU comes out of the current
interrupt subroutine. Interrupt priority can be controlled through software by deciding which flag in the IntRq
register should be serviced first.
For SWB interactive mode interrupt see section 11.0 Serial Write Buffer.
9.1. Interrupt control registers
Table 31.Main Interrupt request register - IntRq (Read Only)*
If the SLEEP flag is written with 1 then the EM6603 goes immediately into SLEEP mode (SLmask was at 1).
Bit
3
2
1
0
2
External (3)
Internal (3)
* Write bit 2 only if Slmask=1
Name
INTPR
INTTE
INTPC
INTPA
SLEEP
- PortA PA3..PA0 inputs
- PortC PC3..PC0 inputs
- combined AND of PortA * PortC
- Prescaler ck[6] / ck[4] / ck[1]
- Timer/Event counter
- SWB in interactive mode
Reset
0
0
0
0
0
(32Hz / 8Hz / 1Hz *f1)
R/W
R
R
R
R
W*
Prescaler interrupt request
Timer/counter interrupt request
PortC Interrupt request
PortA Interrupt request
SLEEP mode flag
Description
© EM Microelectonic-Marin SA, 02/99, Rev. B/243
EM6605
19

Related parts for EM6605