Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
Hello, I met with difficulty when I tried to write the program for the input and output to the 5402 DSK. Does anyone can help me to write a single program which only receives a sine wave with f=200Hz and output it without doing any process? Thanks a lot! Lily |
|
|
|
If you are working in C then there is an example that does this. Look in C:\ti\examples\dsk5402\dsp\codec or C:\ti\examples\dsk5402\dsp\codec_bios If you want to use assembly language then the sinewave generator demo in C:\ti\examples\dsk5402\host\dsp is very easy to modify. HTH, Les > Hello, > > I met with difficulty when I tried to write the > program for the input and output to the 5402 DSK. Does > anyone can help me to write a single program which > only receives a sine wave with f=200Hz and output it > without doing any process? > > Thanks a lot! > > Lily > _____________________________________ |
|
Hi Lily I think this may help you to input and output a sinewave through a codec using MCBSP. 1. Initialize codec. If you are using AD50 initialize the following codec_dac_mode codec_adc_mode codec_ain_gain codec_aout_gain codec_sample_rate 2. Initialize the interrupts INTR_GLOBAL_DISABLE; INTR_HOOK INTR_ENABLE INTR_GLOBAL_ENABLE 3. use the follwing lines for input-output Reading input int input_sample() { return(*(volatile u16*)DRR1_ADDR(HANDSET_CODEC)); } displaying Output void output_sample(int data) { *(volatile u16*)DXR1_ADDR(HANDSET_CODEC)=data; } I think this should work fine. For reading the signal of appropriate frequency you ave to give the Nyquest Frequency value in "Codec_sample_rate" function. Vino >From: Ping Li <> >To: >Subject: [c54x] input and output to the 5402 DSK >Date: Wed, 19 Jun 2002 14:44:21 -0700 (PDT) > >Hello, > >I met with difficulty when I tried to write the >program for the input and output to the 5402 DSK. Does >anyone can help me to write a single program which >only receives a sine wave with f=200Hz and output it >without doing any process? > >Thanks a lot! > >Lily >_____________________________________ _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
|
|
|
I was reading a CCS help file. It said there that there is passive filtering between the input audio jack and the codec for increased performance (of codec). Is this passive filter an anti-alias filter? What does it exactly do? thanks leonor |
|
You may try to read the spru302 page4-30~36. Use that setting to match your i/o . Then polling the input then output to the output pin . Because I can't think that H/W can support this . --- Ping Li <> 的訊息:> Hello, > > I met with difficulty when I tried to write the > program for the input and output to the 5402 DSK. > Does > anyone can help me to write a single program which > only receives a sine wave with f=200Hz and output it > without doing any process? > > Thanks a lot! > > Lily > _____________________________________ > ----------------------------------------------------------------- < 每天都 Yahoo!奇摩 > www.yahoo.com.tw |