
Originally Posted by
ronsimpson
Micro vs DSP
A micro is built to look at a key—blink a LED- send “hello” out the serial port.
A DSP is built to look at audio or video and do 100s of millions of math operations/second. I have worked on projects where we looked at a pixel of video plus the nearest 10 pixels (times 3; red, green & blue) ran all 30 values through a formula 30,000,000 times a second. The little dsPIC cannot run that fast. A DSP can do micro-type jobs like blink a LED but it is a wast.
MATH: Let’s say we have an 8 bit micro. The largest number it can easily think of is 11111111 binary or 255 decimal. 255+1=0 + carry. So:254+1=255+1=0+1=1+1=2+1=3
Numbers role over from largest to smallest or from smallest to largest.
In typical DSP math there is “saturation”. So:254+1=255+1=255+1=255+1=255-1=254-1=253 In audio if the signal gets too large it should saturate or clip not role over!
The Mikro.com compilers look good. The Basic, C and Pascal compilers have the same look and feel. (good) The PIC, 8051, RISK and DSP compilers have the same look and feel. (mostly good) I think the DSP version treats the DSP like a micro to get the same feel. The little dsPIC should be able to do 40 bit adds, substation and shifts with saturation in one instruction and 17 bit multiplies with saturation. By looking at the manual and I feel the DSP-mikroBASIC compiler only uses 16 bit ‘role over’ math. There is no real DSP functions. I do not see a way of easily making an audio graphic-equalizer out of a dsPIC using the DSP-mikroBASIC compiler. A DSP doing a micro’s job will be fast, but if it is limited to doing a micro’s job by the mikro compiler. I just could not find FFT code maybe I misted it.
Bookmarks