Hello - Has anyone out there been doing processing of audio signals coming in through the A/D of the BF533 EZ-KIT, based on the "Talkthrough" demo project? I've been having lots of trouble trying to scale or multiply signals. Delay lines through SDRAM work fine. Much of this turns out to be a bug in the serial port where the words are swapped, so now I have some code from tech support at Analog that does this: int swapwords(int inpt) // for serial input bug { int temp1, temp2, temp; temp1 = inpt & 0xffff ; temp2 = (inpt >> 16) & 0xffff ; temp = temp2 | (temp1 << 16) ; return(temp); } All of this code is the in the process_data.c file. Sending this integer variable straight through works fine, but for scaling and mixing the 32 bit int coming in should be converted to a fract16 or fract32 datatype first, to take advantage of the rounding arithmetic. When I try shifts and scales of the integer itself, I get distortion. When I copy the in to a fract32 and try some of the shifts or multiplying intrisics, the signal disappears entirely and all that comes out of the D/As is silence. How should the int be converted to a fract? It also seems like 32 bits is overkill, since the data coming in and going out is 16 bit. Which half of the word contains the data? I can't see variables since I'm running the free limited license of VisualDSP, which doesn't let you set breakpoints or look at variables :(. I'm used to processors like the 56k where everything is what ADI calls a fract. Thanks in advance, Steve C http://curtin.emf.org/ |
|
BF533 scaling and processing?
Started by ●November 7, 2003
Reply by ●November 8, 20032003-11-08
--On Friday, November 07, 2003 3:17 PM +0000 Steven Curtin <> wrote: > How should the int be converted to a fract? It also seems like 32 > bits is overkill, since the data coming in and going out is 16 bit. > Which half of the word contains the data? I can't see variables > since I'm running the free limited license of VisualDSP, which > doesn't let you set breakpoints or look at variables :(. You could try compiling to assembly ("-S" switch) to see the generated code. I use that all the time with other CPU's to understand what the compiler really does "under the hood". |
Reply by ●November 21, 20032003-11-21
Hello, I found the problem with the BF533. It turns out that there is a bug in the I2S talkthrough demo, where the data goes through until you do any math on it. ADI tech support is currently looking into why this is. Using the TDM talkthrough demo works fine, I now have a nice bouncing back and forth stereo delay working, with more complex delays and reverbs on the way. If anyone out there wants the source, I can email it to them. Steve C --- In , "Steven Curtin" <sdcurtin1@y...> wrote: > Hello - > > Has anyone out there been doing processing of audio signals coming in > through the A/D of the BF533 EZ-KIT, based on the "Talkthrough" demo > project? |