Embedded Target for Texas Instruments C6000 DSPs    
C6701 EVM DAC

Use and configure the codec to convert digital input to analog output

Library

c6701evmlib in Embedded Target for TI C6000 DSP

Description

Adding the C6701 EVM DAC (digital-to-analog converter) block to your Simulink model provides the means to output an analog signal to the LINE OUT connection on the C6701 EVM mounting bracket. When you add the C6701 EVM DAC block, the digital signal received by the codec is converted to an analog signal. After converting the digital signal to analog form (digital-to-analog (D/A) conversion), the codec sends the signal to the output audio jack.

Two of the configuration options in the block affect the codec. The remaining options relate to the model you are using in Simulink and the signal processor on the board. In the following table, you find each option listed with the C6701 EVM hardware affected.

Option
Affected Hardware
Codec data format
Codec
DAC attenuation
Codec
Overflow mode
TMS320C6701 Digital Signal Processor
Scaling
TMS320C6701 Digital Signal Processor

To attenuate the output signal after the D/A conversion, select an attenuation from the DAC attenuation list. Available attenuation values range from 0.0 to 94.5 dB in 1.5 dB increments. You must select from the list; you cannot enter a value for the attenuation.

For the block to accept data from your Simulink model, you must configure the data format. The parameters Codec data format and Scaling inform the block of the format of the digital data being received. Entries in Table 6-3, Expected Data Range for Data Type and Codec Data Format Parameter Combinations, define the D/A input format based on the data type inherited from the preceding block and your selection for the Codec data format parameter in the Block Parameters dialog box.

Table 6-3: Expected Data Range for Data Type and Codec Data Format Parameter Combinations


Inherited Data Type Parameter


Integer
Single- or Double- Precision, Normalized
Single- or Double- Precision, Floating Point Integer
Codec Data Format
8-bit Unsigned
0-255
-1.0 to 1.0
0.0 to 255.0
16-bit Linear
-32768 to 32767
-1.0 to 1.0
-32768.0 to 32767.0
A-law
Unsigned 8-bit (0-255)
-1.0 to 1.0
0.0 to 255.0
µ-law
Unsigned 8-bit (0-255)
-1.0 to 1.0
0.0 to 255.0
ADPCM
Unsigned 8-bit (0-255)
N/A
0.0 to 255.0

For example, when you select 16-bit linear codec data format, with normalized scaling, and the block inherits the Double data type, the C6701 EVM DAC block expects to receive a digitized signal with each sample 16 bits long and ranging from -1.0 to 1.0. Signals that do not meet these criteria result in an error.

Tables 4-4 and 4-5 list the codec data formats you can select for the block. The following list provides brief descriptions of the available data formats:

While converting the digital signal to an analog signal, the codec rounds floating point data to the nearest integer, thus rounding 0.51 up to 1.0 or 4.49 down to 4.0. In addition, data that exceeds the range for a selected codec data format and data type is clipped or wrapped depending on the Overflow mode setting. Clipping is equivalent to saturating. To choose how the board handles data that falls outside the range that can be represented by the chosen data format, select an appropriate setting from Overflow mode. Saturate is the default setting. Selecting Saturate instructs the codec to clip output values to the maximum or minimum allowed value when output data exceeds the range of the data format. When you select Wrapping, the codec takes data that exceeds the acceptable output range and wraps the data back into the acceptable range using modular arithmetic relative to the smallest representable number. Selecting wrapping for the Overflow Mode can increase the performance of your application, but risks generating output values that exceed the codec data format limits and are wrapped back into the range of acceptable values.

Dialog Box

Codec data format
Tells the codec the format of data coming into it. Used in combination with the Scaling and Data type parameters to define the digital data entering the block. The block converts the input digital signal to an analog output signal based on how it interprets the input data stream. Codec data format tells the block how to interpret the input values.
The C6701 EVM DAC block Codec data format must match the Codec data format for the C6701 EVM ADC block in your model, if any.
Scaling
Selects whether the input to the codec represents unmodified data, or data that has been normalized to the range ±1.0. Matching the setting for the C6701 EVM ADC block is usually appropriate here.
Overflow mode
Determines how the codec responds to data that is outside the range specified by the Codec data format and Scaling parameters.
DAC attenuation
Specifies the amount to attenuate the block output after D/A conversion.

See Also
C6701 EVM ADC


  C6701 EVM ADC C6701 EVM DIP Switch