23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13.4 Description of Operations<br />

13.4.1 Analog Reference Voltage<br />

Under development<br />

<strong>TMPM330</strong> (rev 0.4)13 -16<br />

<strong>TMPM330</strong><br />

The "H" level of the analog reference voltage shall be applied to the VREFH pin, and the<br />

"L" level shall be applied to the VREFL pin. By writing "0" to the ADMOD1 bit,<br />

a switched-on state of VREFH-VREFL can be turned into a switched-off state. To start AD<br />

conversion, make sure that you first write "1" to the bit, wait for 3 μs during<br />

which time the internal reference voltage should stabilize, and then write "1" to the<br />

ADMOD0 bit.<br />

13.4.2 Selecting the Analog Input Channel<br />

How the analog input channel is selected is different depending on A/D converter<br />

operation mode used.<br />

(1) Normal AD conversion mode<br />

• If the analog input channel is used in a fixed state (ADMOD0="0"):<br />

One channel is selected from analog input pins AIN0 through AIN11 by setting<br />

ADMOD1 to an appropriate setting.<br />

• If the analog input channel is used in a scan state (ADMOD0="1"):<br />

One scan mode is selected from 12 scan modes by setting ADMOD1 and<br />

ADSCN to appropriate settings.<br />

(2)Top-priority AD conversion mode<br />

One channel is selected from analog input pins AIN0 through AIN11 by setting<br />

ADMOD2 to an appropriate setting.<br />

After a reset, ADMOD0 is initialized to "0" and ADMOD1 is<br />

initialized to "0000." This initialization works as a trigger to select a fixed channel input<br />

through the AN0 pin. The pins that are not used as analog input channels can be used as<br />

ordinary input ports.<br />

If top-priority AD conversion is activated during normal AD conversion, normal AD<br />

conversion is discontinued, top-priority AD conversion is executed and completed, and<br />

then normal AD conversion is resumed.<br />

Example: A case in which repeat-scan conversion is ongoing at channels AIN0<br />

through AIN3 with ADMOD0 set to "11" and<br />

ADMOD1 set to 0011, and top-priority AD conversion has been<br />

activated at AIN12 with ADMOD2=1100.<br />

Top-priority AD<br />

has been activated<br />

Conversion Ch0 Ch1 Ch2 Ch12 Ch2 Ch3 Ch0<br />

Ch<br />

Analog/ Digital Converter

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!