Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Discussion Groups

Discussion Groups | TMS320C55x | Re: query regarding interfacing of ADC/DAC for speech i/p and o/p

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

Re: query regarding interfacing of ADC/DAC for speech i/p and o/p - umer...@yahoo.com - Oct 4 8:23:19 2006



Hi Dear, 
        So did u find answer to your query? I am really a new comer in DSP domain and unknown
to working C5510 in detail. I want to read audio input from mic and store it.Then i want to
play it back to headphone.

This is my main():

void main()
{
    
    DSK5510_AIC23_CodecHandle hCodec;
    Int16 i,j,k,left,right;
    Int16 input1[8000];
 	Int16 input2[8000];
    /* Initialize the board support library, must be called first */
    DSK5510_init();

    /* Start the codec */
    hCodec = DSK5510_AIC23_openCodec(0, &config);

    /* Generate a 1KHz sine wave for 5 seconds */
    for (i = 0; i < 10; i++)
    {
        for (j = 0; j < 8000; j++)
        {
            /* Read a sample from left channel */
            while (!DSK5510_AIC23_read16(hCodec, &left));
            input1[j]=left;
            
            /* Read a sample from right channel */
            while (!DSK5510_AIC23_read16(hCodec, &right));		 
            input2[j]= right;            
	    }
		       
     }
    for (i = 0; i < 10; i++)
    {
	  for(k=0; k<8000;k++)
	  {
        while(!DSK5510_AIC23_write16(hCodec, input1[k]));
        /* Send a sample to the right channel */
        while(!DSK5510_AIC23_write16(hCodec, input2[k]));
	  }
    }
    /* Close the codec */
    DSK5510_AIC23_closeCodec(hCodec);
}

But it is not giving any output. What to do?
kindly help me where i am going wrong. I will be waiting for ur reply

regards,
Umer 
>  
>
>    
>  hello everybody  
>i m an student doing project "Real time  
>implementation of G.723.1 on TMS320VC5510"  
>right now i am ready with optimised code which is  
>running in CCS simulator by taking i/p from file and  
>putting o/p in2 file  
>but now my next step is to run it in to DSK board for  
>that i have to take i/p from mike and taken o/p from  
>headphone  
>and for that i have to interface adc/dac of that  
>particular board which uses AIC23 as a codec.  
>i tried 2 get some idea from audio project available  
>in TI but not getting the flow as i don't aquant with  
>DSP-BIOS also  
>please any1 sugest me how to proceed or else can  
>anybody send me programme to interface codec withought  
>using DSP-BIOS  
>  
>sorry for long mail  
>waiting for early reply as i have to submit my project  
>bbye  
>Alpana  
>M.E.(GCOEP)  
>Pune  
>  
>



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

Re: Re: query regarding interfacing of ADC/DAC for speech i/p and o/p - Jeff Brower - Oct 4 12:08:23 2006

Umer-

>         So did u find answer to your query? I am really a new comer in
> DSP domain and unknown to working C5510 in detail. I want to read
> audio input from mic and store it.Then i want to play it back to
> headphone.
>
> This is my main():

First I would try something very simple to verify your DSK board, tool
set-up, build options, memory map, and other basic factors are Ok:

void main() {

DSK5510_AIC23_CodecHandle hCodec;
Int16 left,right;

    /* Initialize the board support library, must be called first */
    DSK5510_init();

    /* Start the codec */
    hCodec = DSK5510_AIC23_openCodec(0, &config);

    /* Audio loopback */
    while (TRUE) {

      while (!DSK5510_AIC23_read16(hCodec, &left));
      while (!DSK5510_AIC23_read16(hCodec, &right));

      while(!DSK5510_AIC23_write16(hCodec, left));
      while(!DSK5510_AIC23_write16(hCodec, right));
    }

    DSK5510_AIC23_closeCodec(hCodec);
}

This should enable audio loopback -- you should hear whatever is on the
inputs.  Does that much work?  If so, then you can go step-by-step to add
the functionality you need, testing each step carefully.

Also, here is a nice page for generating a sine wave with DSK 5510:

  http://www.tkt.cs.tut.fi/kurssit/3516/exercises/fall05/test_audioIO.c

-Jeff
> void main()
> {
>
>     DSK5510_AIC23_CodecHandle hCodec;
>     Int16 i,j,k,left,right;
>     Int16 input1[8000];
>  	Int16 input2[8000];
>     /* Initialize the board support library, must be called first */
>     DSK5510_init();
>
>     /* Start the codec */
>     hCodec = DSK5510_AIC23_openCodec(0, &config);
>
>     /* Generate a 1KHz sine wave for 5 seconds */
>     for (i = 0; i < 10; i++)
>     {
>         for (j = 0; j < 8000; j++)
>         {
>             /* Read a sample from left channel */
>             while (!DSK5510_AIC23_read16(hCodec, &left));
>             input1[j]=left;
>
>             /* Read a sample from right channel */
>             while (!DSK5510_AIC23_read16(hCodec, &right));
>             input2[j]= right;
> 	    }
>
>      }
>     for (i = 0; i < 10; i++)
>     {
> 	  for(k=0; k<8000;k++)
> 	  {
>         while(!DSK5510_AIC23_write16(hCodec, input1[k]));
>         /* Send a sample to the right channel */
>         while(!DSK5510_AIC23_write16(hCodec, input2[k]));
> 	  }
>     }
>     /* Close the codec */
>     DSK5510_AIC23_closeCodec(hCodec);
> }
>
> But it is not giving any output. What to do?
> kindly help me where i am going wrong. I will be waiting for ur reply
>
> regards,
> Umer
>>
>>  hello everybody
>>i m an student doing project "Real time
>>implementation of G.723.1 on TMS320VC5510"
>>right now i am ready with optimised code which is
>>running in CCS simulator by taking i/p from file and
>>putting o/p in2 file
>>but now my next step is to run it in to DSK board for
>>that i have to take i/p from mike and taken o/p from
>>headphone
>>and for that i have to interface adc/dac of that
>>particular board which uses AIC23 as a codec.
>>i tried 2 get some idea from audio project available
>>in TI but not getting the flow as i don't aquant with
>>DSP-BIOS also
>>please any1 sugest me how to proceed or else can
>>anybody send me programme to interface codec withought
>>using DSP-BIOS
>>
>>sorry for long mail
>>waiting for early reply as i have to submit my project
>>bbye
>>Alpana
>>M.E.(GCOEP)
>>Pune
>>
>



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