Main Content

ADC Type 0

Analog-to-digital converter (ADC)

  • C281x 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

The C281x ADC block configures the C281x ADC to perform analog-to-digital conversion of signals connected to the selected ADC input pins. The ADC block outputs digital values representing the analog input signal and stores the converted values in the result register of your digital signal processor. You use this block to capture and digitize analog signals from external sources such as signal generators, frequency generators, or audio devices.

Ports

Output

expand all

The output of the C281x ADC is a vector of uint16 values. The output values are in the range 0 to 4095 because the C281x ADC is 12-bit converter.

Data Types:

Parameters

expand all

ADC Control

Specify which DSP module to use:

  • A — Displays the ADC channels in module A (ADCINA0 through ADCINA7).

  • B — Displays the ADC channels in module B (ADCINB0 through ADCINB7).

  • A and B — Displays the ADC channels in both modules A and B (ADCINA0 through ADCINA7 and ADCINB0 through ADCINB7)

Then, use the check boxes to select the desired ADC channels.

Type of sampling to use for the signals:

  • Sequential — Samples the selected channels sequentially

  • Simultaneous — Samples the corresponding channels of modules A and B at the same time

Specify the type of signal that triggers the conversion:

  • Software — Signal from software

  • EVA — Signal from Event Manager A (only for Module A)

  • EVB — Signal from Event Manager B (only for Module B)

  • External — Signal from external hardware

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.

To set different sample times for different groups of ADC channels, you must add separate C281x ADC blocks to your model and set the desired sample times for each block.

Date type of the output data.

Enable this check box to post an asynchronous interrupt at the end of each conversion. The interrupt is posted at the end of conversion.

Input channels

Number of ADC channels to use for analog-to-digital conversions.

Specific ADC channel to associate with each conversion number.

In oversampling mode, a signal at a given ADC channel can be sampled multiple times during a single conversion sequence. To oversample, specify the same channel for more than one conversion. Converted samples are output as a single vector.

If more than one ADC channel is used for conversion, you can use separate ports for each output and show the output ports on the block. If you use more than one channel and do not use multiple output ports, the data is output in a single vector.

More About

expand all

Version History

Introduced in R2016b