[sdiy] How automatic is the DSP on the dsPIC33f??

Eric Brombaugh ebrombaugh1 at cox.net
Sun May 20 04:59:30 CEST 2012


On 05/19/2012 07:37 PM, dan snazelle wrote:
> Lets say I program something in the C30 compiler for Mplab using the Dspic33fj64gp802 as the device.
> in order to take advantage of things like MAC, and the things contained in the DSP library, is it necessary to program in some special way?
>
> or does the C30 compiler do a good job of figuring out which sections of C code could and should be converted to code the DSP section of the DSPIC can process?
>
> otherwise, without knowing how to implement the DSP section, it seems the dsPIC33f series would operate no differently than a PIC24 with a DAC built in.

While the C30 compiler claims to support the accumulators and has some 
limited intrinsics, when using standard C coding practices it doesn't 
know diddly about the DSP features. In order to maximize the use of the 
MAC you'll have to code in assembly language, explicitly invoke 
intrinsics or use the routines in the MCHP DSP library.

I typically code in a mixture of C and assembly - C for all the setup 
and control flow, with custom assembly functions linked in that handle 
all my DSP. It's fairly straightforward, but you do have to get up close 
and personal with the dsPIC instruction set. There's really no way 
around that. As you noted, without taking some special measures you 
might as well be using a PIC24.

Eric



More information about the Synth-diy mailing list