3 operation, Toshiba – Toshiba TMP87CP24AF User Manual

Page 107

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

AD Converter Control Register

ADCCR

(OOOE

h

)

7

6

5

4

3

2 1

0

EOCF

ADS

ACK

AINDS

SAIN

______ 1_____ 1_____ 1_____

(Initial value :

0000 0000)

0000

AINO

0001

AIN1

0010

AIN2

0011

AIN3

SAIN

Analog input selection

0100

0101

AIN4
AIN5

0110

AIN6

0111

AIN7

1 ***

Reserved

R/W

AINDS

Analog input control

0 : Enable

1 : Disable

ACK

Conversion time selection

0 : Conversion time = 23

jus

(at fc = 8 MHz)

1 : Conversion time = 92//s

ADS

AD conversion start

0 : -

1 : AD conversion start

EOCF

End of AD conversion flag

0 : Under conversion or Before conversion

1 : End of conversion

Note 1

Note 2

Note3

Note 4

Note 5

*: Don't care

Select analog input when AD converter stops.

The ADS is automatically cleared to "0" after starting conversion.

The EOCF is cleared to "0" when reading the ADCDR.

The EOCF is read-only.

Figure 2-59. AD Converter Control Register and AD Conversion Result Register

2.11.3

Operation

The high side of an analog reference voltage is applied to VAREF pin, and the low side is applied to VASS

pin.

The

reference

voltage

between

VAREF

and

VASS

is

divided

into

the

voltage

corresponding

with

bits

by

radar

resistance.

The

reference

voltage

is

compared

with

an

analog

input

voltage

and

AD

conversion

is performed.

(1) Start of AD conversion

Prior

to

AD

conversion

start,

select

one

pin

among

analog

input

channels

(AIN7

to

AINO)

using

the

SAIN (bit 3 to 0 in ADCCR). Clear AINDS (bit 4 in ADDCCR) to 0 and clear the channel to be used for

analog input using the P5 I/O control register (P5CR).

Note : Pins not used for analog input can be used as an I/O port; to maintain accuracy, do not use

them for output during AD conversion.

Set AD conversion time using the ACK (bit 5 in ADCCR).

To start AD conversion, set AD conversion to "1" using the ADS (bit

6

in ADCCR).

AD

conversion

time

is

from

AD

conversion

start

to

AD

conversion

result

being

set

in

ADCDR.

When

ACK = 0,184/fc [s] (46 machine cycles) is necessary. That is, when fc =

8

MHz, the AD conversion time

is 23 /us.

After AD conversion, the EOCF (bit? in ADCCR) is set to "1" indicating end of conversion.

Setting the ADS to "1" during AD conversion resumes conversion from the beginning.

The analog input voltage is sampled every 4 machine cycles after AD conversion start.

3

-

24-107

2002

-

10-03

Advertising
This manual is related to the following products: