Toshiba – Toshiba TMP87CP24AF User Manual

Page 39

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

Note

6:

Change

EINTCR

only

when

IMF

=

0.

After

changing

EINTCR,

interrupt

latches

of

external

interrupt inputs must be cleared to "0" using load instruction.

Example : Changes INT2 edge selection from rising edge to falling edge

Dl

; IMF <-0 (disables interrupt service)

LD

(EINTCR), 10000110B

; INT2ES ^ 1 (changes edge selection)

LD

(ILL),01111111B

; IL7 ^ 0 (dears interrupt latch)

El

; IMF <-1 (enables interrupt service)

Note?:

if

changing

the

contents

of

INT1ES

during

NORMAL1/2

mode,

interrupt

latch

of

external

interrupt input INTI must be cleared after 14 machine cycles (when INT1NC =1) or 50 machine

cycles (when INT1NC = 0) from the time of changing. During SLOW mode, 3 machine cycles are

required.

Note 8: In order to change of external interrupt input by rewriting the contents of INT2ES and INT3ES

during

NORMAL1/2

mode,

clear

interrupt latches

of external interrupt

inputs

(INT2

and

INT3)

after 8 machine cycles from the time of rewriting. During SLOW mode, 3 machine cycles are

required.

Note 9: In order to change an edge of timer counter input by rewriting the contents of INT2ES and

INT3ES during NORMAL 1/2 mode, rewrite the contents after timer counter is stopped (TC*s = 0),

that is, interrupt disable state. Then, clear interrupt laches of external interrupt inputs (INT2

and INT3) after 8 machine cycles from the time of rewriting to change to interrupt enable state.

Finally, start timer counter. During SLOW mode, 3 machine cycles are required.

Example : When changing TCI pin inputs edge in external trigger timer mode from rising edge to

falling edge.

8

-machine

cycles

I

LD(TC1CR),01001000B

Dl

LD (EINTCR),00000100B

NOP

to

NOP

LD (ILL),01111111B

El

LD(TC1CR),01111000B

T C I 0 0 (stop TCI)

IMF

0

(disable

interrupt

service)

INT2ES <- 1 (change edge selection)

IL7 <-0 (clear interrupt latch)

IMF

1

(enable

interrupt

service)

TCIS^II (startTCI)

Note 10:

When high-impedance is specified for port output in stop mode, port input is forcibly fixed

to

low

level

internally.

Thus,

interrupt

latches

of

external

interrupt

inputs

except

I

NTS

(P20/STOP) which are also used as ports may be set to "1". To specify high-impedance for

port output in stop mode, first disable interrupt service (IMF = 0), activate stop mode. After

releasing

stop

mode,

clear

interrupt

latches

using

load

instruction,

then,

enable

interrupt

service.

Example : Activating stop mode

LD (SYSCR1),01000000B

Dl

SET

LDW

El

(SYSCRI).STOP

(IL), 1111011101010111B

OUTEN

<-

0

(specifies

high-impedance)

IMF <- 0 (disables interrupt service)

STOP <- 1 (activates stop mode)

IL11,7,

5,

3

<-0

(clears

interrupt

latches)

IMF <- 1 (enables interrupt service)

3

-

24-39

2002

-

10-03

Advertising
This manual is related to the following products: