Toshiba – Toshiba TMP87CP24AF User Manual

Page 108

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

(2) Reading of AD conversion result

After the end of conversion, read the conversion result from the ADCDR.

The

EOCF

is

automatically

cleared

to

"0"

when

reading

the

ADCDR.

When

the

conversion

result

is

read out during AD conversion, the invalid value is read out.

(3) AD conversion in STOP mode

When

the

MCU

places

in

the

STOP

mode

during

the

AD

conversion,

the

conversion

is

terminated

and

the

ADCDR

contents

become

indefinite.

Thus

EOCF

is

maintained

to

"0"

after

returned

from

the STOP mode.

However,

if

the

STOP

mode

is

started

after

the

end

of

conversion

(EOCF

=

1),

the

ADCDR

contents

are held.

ADS

ADCDR i

( Invalid )

[ Result ]

(Invalid)

[ Invalid )

J Result

'Conversion time ^

184/fc[s]

'Conversion time^

184/fc[s]

EOCF 1

-----

0—0

-------------------------------------------------- o------o------------ o-----------------------------

"O +J -Q +J +J

(p ro (P fO fO

0^ +-» 0^ +-» +-»

Figure 2-60. AD Conversion Timing Chart

Example:

After AIN pin 4 is selected as an analog input channel, AD conversion is started. EOCF

is confirmed and the converted result is read out. It is saved to address 009E

h

in RAM.

; AIN SELECT

LD

(ADCCR), 00100100B

; selectsAIN4

; AD CONVERT START

SET

(ADCCR). 6

; ADS = 1

SLOOP TEST

(ADCCR). 7

; EOCF = 1 ?

JRS

T, SLOOP

; RESULT DATA READ

LD

(9EH), (ADCDR)

3

-

24-108

2002

-

10-03

Advertising
This manual is related to the following products: