04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<br />

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 11 A/D CONVERTER<br />

11.6.4 Software trigger mode (scan mode, one-shot conversion mode)<br />

In the stop status, the ADCE bit of A/D converter mode register 0 (ADM0) is set to 1, and the system enters the<br />

A/D conversion standby status.<br />

After the software counts up to the stabilization wait time (1 s), the ADCS bit of the ADM0 register is set to 1 to<br />

perform A/D conversion on the four analog input channels specified by scan 0 to scan 3, which are specified by<br />

the analog input channel specification register (ADS). A/D conversion is performed on the analog input channels<br />

in order, starting with that specified by scan 0.<br />

A/D conversion is sequentially performed on the four analog input channels, the conversion results are stored in<br />

the A/D conversion result register (ADCR, ADCRH) each time conversion ends, and the A/D conversion end<br />

interrupt request signal (INTAD) is generated.<br />

After A/D conversion of the four channels ends, the ADCS bit is automatically cleared to 0, and the system enters<br />

the A/D conversion standby status.<br />

When ADCS is overwritten with 1 during conversion operation, the current A/D conversion is interrupted, and<br />

conversion restarts at the first channel. The partially converted data is discarded.<br />

When the value of the ADS register is rewritten or overwritten during conversion operation, the current A/D<br />

conversion is interrupted, and A/D conversion is performed on the first channel respecified by the ADS register.<br />

The partially converted data is discarded.<br />

When ADCS is cleared to 0 during conversion operation, the current A/D conversion is interrupted, and the<br />

system enters the A/D conversion standby status.<br />

When ADCE is cleared to 0 while in the A/D conversion standby status, the A/D converter enters the stop status.<br />

When ADCE = 0, specifying 1 for ADCS is ignored and A/D conversion does not start. In addition, A/D<br />

conversion does not start even if a hardware trigger is input while in the A/D conversion standby status.<br />

Figure 11-22. Example of Software Trigger Mode (Scan Mode, One-Shot Conversion Mode) Operation Timing<br />

ADCE<br />

The trigger<br />

is not<br />

acknowledged.<br />

ADCS<br />

ADS<br />

A/D<br />

conversion<br />

status<br />

ADCR,<br />

ADCRH<br />

INTAD<br />

Stop<br />

status<br />

ADCE is set to 1.<br />

ADCS is set to 1 while<br />

in the conversion<br />

standby status.<br />

ANI0 to ANI3<br />

Conversion<br />

standby<br />

Data 0<br />

(ANI0)<br />

Data 1<br />

(ANI1)<br />

Data 0<br />

(ANI0)<br />

Data 2<br />

(ANI2)<br />

Data 1<br />

(ANI1)<br />

Data 3<br />

(ANI3)<br />

Data 2<br />

(ANI2)<br />

ADCS is<br />

automatically <br />

cleared to<br />

0 after<br />

conversion<br />

ends.<br />

<br />

ADCS is overwritten<br />

with 1 during A/D<br />

conversion operation.<br />

<br />

A/D conversion<br />

ends.<br />

Conversion<br />

standby<br />

Data 3<br />

(ANI3)<br />

Data 0 Data 1<br />

(ANI0) (ANI1)<br />

Conversion is <br />

interrupted and restarts.<br />

Data 0<br />

(ANI0)<br />

Data 0 (ANI0)<br />

Data 1<br />

(ANI1)<br />

Conversion<br />

standby<br />

R01UH0317EJ0004 Rev. 0.04 534<br />

Feb. 22, 2013<br />

Data 2<br />

(ANI2)<br />

Data 1<br />

(ANI1)<br />

Data 3<br />

(ANI3)<br />

Data 2<br />

(ANI2)<br />

The interrupt is generated four times. The interrupt is generated four times.<br />

Data 3<br />

(ANI3)<br />

Data 0<br />

(ANI0)<br />

Data 1<br />

(ANI1)<br />

Data 4<br />

(ANI4)<br />

Data 0<br />

(ANI0)<br />

ADCS is cleared<br />

<br />

to 0 during A/D<br />

conversion operation.<br />

ADS is rewritten during<br />

A/D conversion operation.<br />

ANI4 to ANI7<br />

Conversion is<br />

interrupted and restarts.<br />

Data 5<br />

(ANI5)<br />

Data 4<br />

(ANI4)<br />

ADCE is cleared to 0. <br />

Data 6<br />

(ANI6)<br />

Data 5<br />

(ANI5)<br />

Data 7<br />

(ANI7)<br />

Conversion is<br />

interrupted.<br />

Conversion<br />

standby<br />

Data 6<br />

(ANI6)<br />

The trigger<br />

is not<br />

acknowledged.<br />

Stop<br />

status

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

Saved successfully!

Ooh no, something went wrong!