Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

Re: changing frecuency sample rate 48,96,192... 21489

$
0
0

Hi Harshit, thanks for your response,

 

I am using this example, VisualDSP 5.0\214xx\Examples\ADSP-21489 EZ-Board\21489 AD1939 I2S C Sampled-Based Talkthru. I think I2S examples work the same!. I though the sampling rate changed. But i realised with fir filters that the latency remains the same (1/48000)*(TAPS/2+1).

 

#include "ADDS_21489_EzKit.h"

#include "ad1939.h"

asm("#include <def21489.h>");

 

By the way, in order to not start another thread .  Could you please tell me how to store/or define arrays in a specific memory address??For example if i want 4 long arrays from a specific starting address 0x00100000(or whatever) to the end (depending on size).

 

 

// NOTE: To select ADC/DAC Sample Rate of either 48 kHz, 96 kHz or 192 kHz, choose one

//       of the following 3 macros to set the sample rate (only one at a time).

 

 

#define USE_48_KHZ_SAMPLE_RATE

//#define USE_96_KHZ_SAMPLE_RATE

//#define USE_192_KHZ_SAMPLE_RATE

 

 

/* Setup the SPI parameters here in a buffer first */

unsigned char ConfigParam1939 [] = {

            (AD1939_ADDR), DACMUTE, 0x00,

            (AD1939_ADDR), CLKCTRL0, DIS_ADC_DAC | INPUT256 | PLL_IN_MCLK | MCLK_OUT_OFF | PLL_PWR_DWN,

            (AD1939_ADDR), CLKCTRL1, DAC_CLK_PLL | ADC_CLK_PLL | DIS_VREF,

#ifdef USE_48_KHZ_SAMPLE_RATE

            (AD1939_ADDR), DACCTRL0, DAC_FMT_I2S | DAC_BCLK_DLY_1 | DAC_SR_48K,

#endif

#ifdef USE_96_KHZ_SAMPLE_RATE

            (AD1939_ADDR), DACCTRL0, DAC_FMT_I2S | DAC_BCLK_DLY_1 | DAC_SR_96K,

#endif

#ifdef USE_192_KHZ_SAMPLE_RATE

            (AD1939_ADDR), DACCTRL0, DAC_FMT_I2S | DAC_BCLK_DLY_1 | DAC_SR_192K,

#endif

 

           (AD1939_ADDR), DACCTRL1,  DAC_BCLK_SLAVE| DAC_LRCLK_SLAVE  | DAC_CHANNELS_2 | DAC_LATCH_MID, //Ddebug

            (AD1939_ADDR), DACCTRL1,  DAC_BCLK_SLAVE| DAC_LRCLK_SLAVE  | DAC_CHANNELS_2 | DAC_LATCH_MID, //Ddebug

            (AD1939_ADDR), DACCTRL2, DAC_WIDTH_24,

#ifdef USE_48_KHZ_SAMPLE_RATE           

            (AD1939_ADDR), ADCCTRL0, ADC_SR_48K,

#endif

#ifdef USE_96_KHZ_SAMPLE_RATE           

            (AD1939_ADDR), ADCCTRL0, ADC_SR_96K,

#endif  

#ifdef USE_192_KHZ_SAMPLE_RATE           

            (AD1939_ADDR), ADCCTRL0, ADC_SR_192K,

#endif       

 

 

BR

 

CarlosM


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>