This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6713 aic23b

I am just beginner with my DSP program. I got a simple example about with this board. The result is good, but i can't figure out the relationship between my input and the binary number. 

/*
* main.c
*/

#include "dsk6713.h"
#include "dsk6713_aic23.h"
#include "stdlib.h"
#include "math.h"

// Codec configuration settings
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x01f9, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x01f9, /* 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume */ \
0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
0x0001, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
};

void main()
{
DSK6713_AIC23_CodecHandle hCodec;
Uint32 readval;

// Initialize BSL
DSK6713_init();

//Start codec
hCodec = DSK6713_AIC23_openCodec(0, &config);

// Set frequency to 8KHz
DSK6713_AIC23_setFreq(hCodec, DSK6713_AIC23_FREQ_8kHZ);

for(;;)
{

// Read sample from the left channel
while (!DSK6713_AIC23_read(hCodec, &readval));

while (!DSK6713_AIC23_write(hCodec, readval));

}

// DSK6713_AIC23_closeCodec(hCodec); // Codec close is unreachable
}

 With this i can put the Line_in to the Line_out. (my line_in_Left = line_in_right and they are sine signal with 100Hz and 1Vpp). But there is the question, if i check the  readval, it will be a 32 bits number, and the first 16 bits are all 0. Just the last 16 bits changed. I can't figure out the relationship between the input Voltage and this binary  number. Could someone give me a hand?

thx very much.

  • Hi, Qian,

    Please check the section in the data sheet titled, "Digital Audio Interface Format (Address: 0000111)".

    If that doesn't clarify the issue, I recommend you input a sine wave and study the codes coming out.

    -d2

  • First thank you very much for reply,

    but there are just 7 bits for the "Digital Audio Interface". And if i give the board a Sine wave signal. I got 32 bits. 

    Name : readval
    Default:55154
    Hex:0x0000D772
    Decimal:55154
    Octal:0153562
    Binary:00000000000000001101011101110010

    Name : readval
    Default:4096
    Hex:0x00001000
    Decimal:4096
    Octal:010000
    Binary:00000000000000000001000000000000

    The first 16 Bits are always 0. But at Output contain two channel. It sames that, my readval is not dependent on my input Signal. Could you please tell me why?

    thanks alot