AnsweredAssumed Answered

BF533 EZ KIT using DAC3

Question asked by ridwanoz on Sep 6, 2012
Latest reply on Oct 19, 2012 by Prashant

Hi,

 

I work on ADSP BF533 EZ Kit Lite and i need to use DAC3 audio output also.

 

in order to achieve this i made some modifications on talkthrough example, which i copied it from installation directory.

However the following changes does not provide me to use DAC3 stereo output.

 

Red lines are the changes i made.

How can I use DAC3 stereo output ?

 

Thanks ,

Waiting for help,

 

--

Rıdvan

 

________________________________________

changes in Talkthrough.h file:

 

....

// names for slots in ad1836 audio frame

#define INTERNAL_ADC_L0                              0

#define INTERNAL_ADC_R0                              2

#define INTERNAL_DAC_L0                              0

#define INTERNAL_DAC_R0                              2

#define INTERNAL_ADC_L1                              1

#define INTERNAL_ADC_R1                              3

#define INTERNAL_DAC_L1                              1

#define INTERNAL_DAC_R1                              3

#define INTERNAL_DAC_L2                              4

#define INTERNAL_DAC_R2                              5

 

....

//--------------------------------------------------------------------------//

// Global variables                                                                                                                                                      //

//--------------------------------------------------------------------------//

extern int iChannel0LeftIn;

extern int iChannel0RightIn;

extern int iChannel0LeftOut;

extern int iChannel0RightOut;

extern int iChannel1LeftIn;

extern int iChannel1RightIn;

extern int iChannel1LeftOut;

extern int iChannel1RightOut;

extern int iChannel2LeftOut;

extern int iChannel2RightOut;

extern volatile short sCodec1836TxRegs[];

extern volatile int iRxBuffer1[];

extern volatile int iTxBuffer1[];

...

________________________________________

 

________________________________________

changes in Process_data.c file:

 

...

 


iChannel0LeftOut = -iChannel1LeftIn;

iChannel0RightOut = iChannel1RightIn;

iChannel1LeftOut = -iChannel1LeftIn;

iChannel1RightOut = iChannel1RightIn;

iChannel2LeftOut = -iChannel1LeftIn;

iChannel2RightOut = iChannel1RightIn;

________________________________________

 

________________________________________

changes in ISR.c file:

 

...

  // copy processed data from variables into dma output buffer

  iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;

  iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut;

  iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut;

  iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut;

  iTxBuffer1[INTERNAL_DAC_L2] = iChannel2LeftOut;

  iTxBuffer1[INTERNAL_DAC_R2] = iChannel2RightOut;

...

________________________________________

 

________________________________________

changes in main.c file:

 

// left input data from ad1836

int iChannel0LeftIn, iChannel1LeftIn;

// right input data from ad1836

int iChannel0RightIn, iChannel1RightIn;

// left ouput data for ad1836

int iChannel0LeftOut, iChannel1LeftOut;

// right ouput data for ad1836

int iChannel0RightOut, iChannel1RightOut;

 

int iChannel2LeftOut, iChannel2RightOut;

 

 

// array for registers to configure the ad1836

// names are defined in "Talkthrough.h"

volatile short sCodec1836TxRegs[CODEC_1836_REGS_LENGTH] =

{

                                                  DAC_CONTROL_1          | 0x000,

                                                  DAC_CONTROL_2          | 0x000,

                                                  DAC_VOLUME_0          | 0x3ff,

                                                  DAC_VOLUME_1          | 0x3ff,

                                                  DAC_VOLUME_2          | 0x3ff,

                                                  DAC_VOLUME_3          | 0x3ff,

                                                  DAC_VOLUME_4          | 0x3ff,

                                                  DAC_VOLUME_5          | 0x3ff,

                                                  ADC_CONTROL_1          | 0x000,

                                                  ADC_CONTROL_2          | 0x000,

                                                  ADC_CONTROL_3          | 0x000

 

};

// SPORT0 DMA transmit buffer

volatile int iTxBuffer1[6];

________________________________________

Outcomes