Toshiba – Toshiba TMP87CP24AF User Manual

Page 35

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

TOSHIBA

TMP87CM24A/P24A

However,

an

acceptance

of

external

interrupt

0

cannot

be

disabled

by

the

EF;

therefore,

if

disablement

is

necessary,

either

the

external

interrupt

function

must

be

disabled

with

INTOEN

in

the

external

interrupt

control

register

(INTOEN)

or

interrupt

processing

must

be

avoided

by

the

program.

(When

INTOEN

=

0,

the interrupt latch IL3 isnotset, therefore, the falling edge of the INTO pin input cannot be detected.)

Example 1 : Disables an external interrupt 0 using INTOEN:

LD

(EINTCR), OOOOOOOOB ; INT0EN<-0

Example 2 : Disables the processing of external interrupt 0 under the software control (using bit 0

at address OOFO

h

as the interrupt processing disable switch):

PINTO:

TEST

(OOFOH). 0

JRS

T, SINTO

RETI

SINTO:

: Interrupt processing :

RETI

Returns without interrupt processing if(OOFOH)o= 1

VINTO :

DW

PINTO

(2)

General-Purpose register save/restore processing

During

interrupt

acceptance

processing,

the

program

counter

and

the

program

status

word

are

automatically

saved

on

the

stack,

but

not

the

accumulator

and

other

registers.

These

registers

are

saved

by

the

program

if

necessary.

Also,

when

nesting

multiple

interrupt

services,

it

is

necessary

to

avoid using the same data memory area for saving registers.

The following method is used to save/restore the general-purpose registers:

© General-purpose register save/restore by register bankchangeove:

General-purpose

registers

can

be

saved

at

high-speed

by

switching

to

a

register

bank

that

is

not in use. Normally, bank 0 is used for the main task and banks 1 to 15 are assigned to

interrupt

service

tasks.

To

increase

the

efficiency

of

data

memory

utilization,

the

same

bank

is assigned for interrupt sources which are not nested.

The

switched

bank

is

automatically

restored

by

executing

an

interrupt

return

instruction

[RETI] or [RETN]. Therefore, it is not necessary for a program to save the RBS.

Example: Register Bank Changeover

PINTxx :

LD

RBS, n

interrupt processing

RETI

; Switches to bank n

(1//S

at

8

M Hz)

; Restores bank and Returns

Figure 1-25. Saving/Restoring General-purpose Registers

3

-

24-35

2002

-

10-03

Advertising
This manual is related to the following products: