Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
БЭМЗ полищук доки / Склад / Datasheet_LM3S6965.pdf
Скачиваний:
10
Добавлен:
21.12.2020
Размер:
6.13 Mб
Скачать

LM3S6965 Microcontroller

12.2.2.3 Sampling Events

Sample triggering for each sample sequencer is defined in the ADC Event Multiplexer Select (ADCEMUX) register. The external peripheral triggering sources vary by Stellaris® family member, butalldevicessharethe"Controller"and"Always"triggers. Softwarecaninitiatesamplingbysetting the SSx bits in the ADC Processor Sample Sequence Initiate (ADCPSSI) register.

Caremustbetakenwhenusingthe"Always"trigger. Ifasequence'spriorityistoohigh,itispossible to starve other lower priority sequences.

12.2.3Hardware Sample Averaging Circuit

Higher precision results can be generated using the hardware averaging circuit, however, the improvedresultsareatthecostofthroughput. Upto64samplescanbeaccumulatedandaveraged to form a single data entry in the sequencer FIFO. Throughput is decreased proportionally to the number of samples in the averaging calculation. For example, if the averaging circuit is configured to average 16 samples, the throughput is decreased by a factor of 16.

Bydefaulttheaveragingcircuitisoffandalldatafromtheconverterpassesthroughtothesequencer FIFO. The averaging hardware is controlled by the ADC Sample Averaging Control (ADCSAC) register (see page 300). There is a single averaging circuit and all input channels receive the same amount of averaging whether they are single-ended or differential.

12.2.4Analog-to-Digital Converter

The converter itself generates a 10-bit output value for selected analog input. Special analog pads are used to minimize the distortion on the input. An internal 3 V reference is used by the converter resultinginsamplevaluesrangingfrom0x000at0Vinputto0x3FFat3Vinputwheninsingle-ended input mode.

12.2.5Differential Sampling

In addition to traditional single-ended sampling, the ADC module supports differential sampling of two analog input channels. To enable differential sampling, software must set the Dn bit in the ADCSSCTL0n register in a step's configuration nibble.

When a sequence step is configured for differential sampling, its corresponding value in the ADCSSMUXn register must be set to one of the four differential pairs, numbered 0-3. Differential pair 0 samples analog inputs 0 and 1; differential pair 1 samples analog inputs 2 and 3; and so on (see Table 12-2 on page 281). The ADC does not support other differential pairings such as analog input 0 with analog input 3. The number of differential pairs supported is dependent on the number of analog inputs (see Table 12-2 on page 281).

Table 12-2. Differential Sampling Pairs

Differential PairAnalog Inputs

0

0 and 1

1

2 and 3

The voltage sampled in differential mode is the difference between the odd and even channels:

∆V (differential voltage) = VIN_EVEN (even channels) – VIN_ODD (odd channels), therefore:

If ∆V = 0, then the conversion result = 0x1FF

If ∆V > 0, then the conversion result > 0x1FF (range is 0x1FF–0x3FF)

November 16, 2008

281

Preliminary

Analog-to-Digital Converter (ADC)

If ∆V < 0, then the conversion result < 0x1FF (range is 0–0x1FF)

The differential pairs assign polarities to the analog inputs: the even-numbered input is always positive, and the odd-numbered input is always negative. In order for a valid conversion result to appear, the negative input must be in the range of ± 1.5 V of the positive input. If an analog input is greater than 3 V or less than 0 V (the valid range for analog inputs), the input voltage is clipped, meaning it appears as either 3 V or 0 V, respectively, to the ADC.

Figure 12-2 on page 282 shows an example of the negative input centered at 1.5 V. In this configuration, the differential range spans from -1.5 V to 1.5 V. Figure 12-3 on page 283 shows an example where the negative input is centered at -0.75 V, meaning inputs on the positive input saturate past a differential voltage of -0.75 V since the input voltage is less than 0 V. Figure

12-4 on page 283 shows an example of the negative input centered at 2.25 V, where inputs on the positivechannelsaturatepastadifferentialvoltageof0.75Vsincetheinputvoltagewouldbegreater than 3 V.

Figure 12-2. Differential Sampling Range, VIN_ODD = 1.5 V

ADC Conversion Result

 

0x3FF

 

 

 

0x1FF

 

 

0 V

1.5 V

3.0 V

VIN_EVEN

-1.5 V

0 V

1.5 V

V

 

VIN_ODD = 1.5 V

 

 

- Input Saturation

282

November 16, 2008

Preliminary

LM3S6965 Microcontroller

Figure 12-3. Differential Sampling Range, VIN_ODD = 0.75 V

 

 

 

 

ADC Conversion Result

 

 

 

 

0x3FF

 

 

 

 

0x1FF

 

 

 

 

0x0FF

 

 

 

0 V

+0.75 V

+2.25 V

VIN_EVEN

-1.5 V

-0.75 V

 

+1.5 V

V

- Input Saturation

Figure 12-4. Differential Sampling Range, VIN_ODD = 2.25 V

 

 

 

ADC Conversion Result

 

 

 

 

0x3FF

 

 

 

 

0x2FF

 

 

 

 

0x1FF

 

 

 

0.75 V

2.25 V

3.0 V

 

VIN_EVEN

-1.5 V

 

0.75 V

1.5 V

V

- Input Saturation

12.2.6Test Modes

There is a user-available test mode that allows for loopback operation within the digital portion of theADCmodule. Thiscanbeusefulfordebuggingsoftwarewithouthavingtoprovideactualanalog stimulus. This mode is available through the ADC Test Mode Loopback (ADCTMLB) register (see page 313).

November 16, 2008

283

Preliminary

Соседние файлы в папке Склад