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/
|