Main Content

ADC Type 3-5

Configure ADC to sample analog pins and output digital data

  • C2802x/C2803x/C2805x/C2806x/F28M3x/F2807x/F2837xD/F2837xS/F2838x/F2800xx ADC block

Libraries:
C2000 Microcontroller Blockset / C2802x
C2000 Microcontroller Blockset / C2803x
C2000 Microcontroller Blockset / C2805x
C2000 Microcontroller Blockset / C2806x
C2000 Microcontroller Blockset / C280x
C2000 Microcontroller Blockset / C281x
C2000 Microcontroller Blockset / C2833x
C2000 Microcontroller Blockset / F280013x
C2000 Microcontroller Blockset / F280015x
C2000 Microcontroller Blockset / F28002x
C2000 Microcontroller Blockset / F28003x
C2000 Microcontroller Blockset / F28004x
C2000 Microcontroller Blockset / F2807x
C2000 Microcontroller Blockset / F2837xD
C2000 Microcontroller Blockset / F2837xS
C2000 Microcontroller Blockset / F2838x / C28x
C2000 Microcontroller Blockset / F28M35x / C28x
C2000 Microcontroller Blockset / F28M36x / C28x
C2000 Microcontroller Blockset / F28p65x

Description

Configures the Type 3 to Type 5 ADC to output a constant stream of data collected from the ADC pins on the DSP. For more information on ADC types, refer to C2000 Real-Time Control Peripheral Reference Guide.

An ADC block allows for reading one ADC channel. Use multiple ADC blocks to read multiple ADC channels.

Ports

Output

expand all

The output of the ADC is a vector of uint16 values.

Data Types: uint16

Parameters

expand all

SOC Trigger

Select ADC Module 1 or ADC Module 2 for conversion.

Select ADC Module A through D for the processors that support Type 4 ADC.

Note

The ADC Module parameter is available only for Texas Instruments C2000 processors that support Type 3, Type 4, or Type 5 ADC.

Select 12-bit (Single-ended input) or 16-bit (Differential inputs) ADC resolution options.

In 12-bit mode, only single-ended input is supported. In 16-bit mode, the input voltage to the converter is sampled through a pair of input pins, that means the differential inputs between the two channels is converted.

Note

  • This parameter is supported only for Texas Instruments C2000 F2837xD, Texas Instruments C2000 F2838x and Texas Instruments C2000 F2837xS processors.

  • The 16-bit (Differential inputs) ADC mode is not enabled by default in most of the processors.

Type of sampling to use for the signals:

  • Single — Samples the selected channels sequentially,

  • Simultaneous — Samples the corresponding channels of modules 1 and 2 at the same time. The hardware allows each signal of a pair to be sampled at the same time.

Note

This parameter is supported only for Texas Instruments C2000 F28M3x processors.

Identify the start-of-conversion trigger by number. In single sampling mode, you can select an individual trigger. In simultaneous sampling mode, you can select triggers in pairs.

Define the length of the acquisition period in ADC clock cycles. The value of this parameter depends on the SYSCLK and the minimum ADC sample time. The value of SOC acquisition window is subtracted by 1 and set to ACQPS field in ADC register. For more information, see the ADC Acquisition (Sample and Hold) Window section of the TMS320x2802x, 2803x Piccolo Analog-to-Digital Converter (ADC) and Comparator Reference Guide.

Select the source that triggers the start of conversion. The following types of inputs are available:

  • Software.

  • CPU Timers 0/1/2 interrupts.

  • XINT2 SOC.

  • ePWMx SOCA and SOCB.

If you set SOCx trigger source to XINT2_XINT2SOC, use the Input5 pin assignment parameter at Hardware Implementation > Target hardware resources to define the external GPIO pin that triggers the start of conversion.

Note

The SOCx trigger source input ePWMx SOCA and SOCB range will vary according the processor selected.

At the end of conversion, use the ADCINT1 or ADCINT2 interrupt to trigger a start of conversion (SOC). This loop creates a continuous sequence of conversions. The default selection, No ADCINT disables this parameter. To set the interrupt, select the Post interrupt at EOC trigger option, and choose the appropriate interrupt.

Time in seconds between consecutive sets of samples that are converted for the selected ADC channel(s). This is the rate at which values are read from the result registers. To execute this block asynchronously, set Sample Time to -1, check the Post interrupt at the end of conversion box.

Date type of the output data.

Post interrupts when the ADC triggers EOC pulses. When you select this option, the dialog box displays the Interrupt selection and ADCINT# continuous mode options.

Note

For new processors, the Interrupt selection provides option ADCA#, ADCB# and so on.

Select which interrupt the ADC posts after triggering an EOC pulse.

Dependencies

To enable this parameter, select Post interrupt at EOC trigger parameter.

When the ADC generates an end of conversion (EOC) signal, generate an ADCINT# interrupt, whether the previous interrupt flag has been acknowledged or not.

Dependencies

To enable this parameter, select Post interrupt at EOC trigger parameter.

Input channels

Select the input channel to which this ADC conversion applies. For Type 4 ADC, if you select 16-bit (differential inputs) mode, the differential voltage between the two channels is converted.

Tips

TMS320x2802x, 2803x Piccolo Analog-to-Digital Converter (ADC) and Comparator, Literature Number: SPRUGE5, from the Texas Instruments® Web site.

Configuration of GPIO as Analog Pins

Configuration of GPIO as Analog Pins

For TI F280013x and TI F280015x processors the following tables provides the mapping of GPIO pins which can be used as the analog pins for ADC and CMPSS blocks.

GPIOADCCMPSS
ModuleChannelModuleInput
GPIO12A20
C20
GPIO13A19
C19
GPIO20A17
C17
GPIO21A18
C18
GPIO28A16
C16
GPIO224A21Positive
C9
GPIO226C63Positive
GPIO227A92Positive
C84Positive
GPIO228A61Positive
GPIO230A102Negative
C10
GPIO242A33Negative
C5

For TI F28P65x processors the following tables provides the mapping of GPIO pins which can be used as the analog pins for ADC and CMPSS blocks.

GPIOADCCMPSS 
ModuleChannelModuleInput
GPIO198B3111Positive
C7
GPIO199B246Positive
C06Negative
GPIO200B256Positive
C1
GPIO201C911Positive
GPIO202C810Positive
GPIO203B3010Positive
C6
GPIO204B252Positive
C95Negative
GPIO205B285Positive
C410Negative
GPIO206B273Positive
C36Negative
GPIO207A307Positive
B67Negative
GPIO208A313Negative
B77Positive
GPIO209A67Positive
GPIO210 4 and 9Positive
A77Negative
GPIO211A88Positive
C24
GPIO212A95Positive
C258Negative
GPIO213A108Positive
C268Negative
GPIO214A118Positive
C27
GPIO215A285Positive
B45Negative
GPIO216A255Positive
B5
GPIO217B82Positive
C2810Negative
GPIO218B92Positive
C299Negative
GPIO219B104Positive
C304Negative

These pins are configured as analog pins if ADC or CMPSS blocks utilize them. Ensure that a GPIO pin is not used as both digital and analog pin. For example, if GPIO12 cannot be used in digital input or digital output block and as ADCA input channel 20.

Version History

Introduced in R2016b