DSPRelated.com
Forums

using McBSP for TI Codecs

Started by sahana rao June 19, 2002
hello

i am working on codec TL320AD50c on TMS320VC5402 DSP
kit.
i have to send data to the codec. should i use DXR or
DRR register of McBSP
In my program i have used DXR register to output the
sample. i am getting the data in the DXR reg. when i
tried to call the input_sample function(as shown
below) i am not getting any value in the DRR reg.i
want to know whether i am using correct reg to send
data to the codec. pls help me out its very urgent.

the part of the pgm is below

int input_sample()
{
return(*(volatile u16*)DRR1_ADDR(HANDSET_CODEC));
}

void output_sample(int data)
{
*(volatile u16*)DXR1_ADDR(HANDSET_CODEC) = data;
*(volatile u16*)DXR1_ADDR(DAA_CODEC) = data;
}

thanks
sahana




DXR - Data Transmit Register.
DRR - Data Receive Register.

From the definitions alone - you should use the DXR.
You'll get the data in the DRR register from CODEC - if you have initialized it
correctly and provided there is some signal on line. (What values are you
getting right now ?)

You can write a simple code which takes the sample from line - gives it to McBSP
DXR - you rewrite the sample to DRR - which gives it to CODEC. This simple
loopback will go a long way in debugging.

You will be having some sample codes also - if not contact your vendor - they
provide these codes in most of the cases.

Hope this helps.
Sachin
hello

i am working on codec TL320AD50c on TMS320VC5402 DSP
kit.
i have to send data to the codec. should i use DXR or
DRR register of McBSP
In my program i have used DXR register to output the
sample. i am getting the data in the DXR reg. when i
tried to call the input_sample function(as shown
below) i am not getting any value in the DRR reg.i
want to know whether i am using correct reg to send
data to the codec. pls help me out its very urgent.

the part of the pgm is below

int input_sample()
{
return(*(volatile u16*)DRR1_ADDR(HANDSET_CODEC));
}

void output_sample(int data)
{
*(volatile u16*)DXR1_ADDR(HANDSET_CODEC) = data;
*(volatile u16*)DXR1_ADDR(DAA_CODEC) = data;
}

thanks
sahana

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://www.yahoogroups.com/group/c54x

Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/