Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | About the transmission between DAI and AD1835

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

About the transmission between DAI and AD1835 - sang...@gmail.com - Mar 13 6:21:53 2008



 Hi,
 Thank you for your help.
 The AD1835's data is in 24-bit format. In "Sample Playbcak" example for ADSP21364
"(*pTXSP1A)=
 (int)temp<<16;", we send 32-bit word to the SPORT while only the most
 significant 16 bits are useful. So, what does the AD1835 receive? Only
 the most significant 16 bits? or 24 bits in which the 8 LSBs are zero?
 or 24 bits in which the MSBsare zero?
 My question occurs in AD conversion, too. Actually, in the
 initialization of the SPORT in the "Sample Playback", it writes
 "
 *pSPCTL0 = (BHD | OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A);
 // Enabling Chaining
 // Block A will be filled first
 *pCPSP0A = (unsigned int) TCB_Block_A - OFFSET + 3 ;
 ".
 In terms of my understanding, all the data from SPORT0 will
 automatically fill in the Block_A. I've used debug mode to check the
 data format. The 24 bits from ADC occupy the LSBs. But the value from
 ADC is something different from expected. The formula of AD conversion
 is:
 Vin*(2^23)/Vref=N.
 Vref=2.25.
 Is that right?
 Actually, I try to play a 1kHz audio signal through DAC1. The data of
 the 1kHz signal are stored in flash previously. With 48kHz sample
 rate, each period of the 1kHz signal has 48 points. Obviously, almost
 half of the 48 points are negative. But in the Block_A which directly
 receives data from ADC, 1024 consecutive points are positive according
 to the two-complement coding scheme. Below is my example, which does a
 little change to the original file.
 int processBlock(unsigned int *block_ptr)
 {
 int i;
 float temp_out;
 unsigned int temp_array[NUM_SAMPLES]={0};
 int average;
 unsigned int peakl;
 //Clear the Block Ready Semaphore
 blockReady = 0;

 //Set the Processing Active Semaphore before starting processing
 isProcessing = 1;
 average=0;

 for(i=0;i<NUM_SAMPLES;i++)
 {
 //*(block_ptr+i) = *(block_ptr+i);
 //*************************************************************
 // to check the value from ADC
 temp_array[i]=(*(block_ptr+i));
 //************************************************************
 average+=(*(block_ptr+i));
 }

 //Clear the Processing Active Semaphore after processing is complete
 isProcessing = 0;
 return average;
 }
 Could you help me with this problem?
 Thank you for your great help.



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )