News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Dspic33CK and FFT routines

Started by Wimax, Feb 08, 2026, 10:06 PM

Previous topic - Next topic

Wimax

Hello,

I am trying to use the DSP routines for dspic33, but I cannot get the one for complex FFT to work on dspic33ck256mp508. In my case, I need to perform a 1024 points FFT. To isolate it from the main programme, I created a simpler one (using 256 point FFT) based on the available example, but Q15.inc creates a linker error "section address must be even" and I can't go on.
Has anyone tried the DSP routines on Dspic33ck ? Any examples of working code ?

trastikata

#1
https://jontio.zapto.org/hda1/dsp.html

This was a great example of using MAC in conjunction with overheadless loops which accelerated the FFT an order of magnitude.

The author also had a neural voice recognition from microphone on dsPIC, based on MAC instructions ... overall the site was priceless source of information.

The site was ahead of its time, I see now it is closed, I regret is I did not saved the site. If you find a mirror or a copy, please share.

Wimax

Hi Trastikata,

Thank you very much for the info, but I didn't find a mirror yet.
Did you try the FFT inside DSP folder of PDS ?
The linker error I get is very strange as I did very small changes on one example code, I don't use the ADC, but I load the input buffer with known data just to see if it runs.


John Lawton

#3
There is a 2025 snapshot on Wayback if that helps:

https://web.archive.org/web/20250418103741/https://jontio.zapto.org/hda1/dsp.html

Maybe ask him where/why the site is gone?

John
-----------------------------------------------------------------------------------------
Amicus 8 and 16A/16B dev boards
Especially created for Positron development
https://www.easy-driver.co.uk/Amicus

trastikata

Quote from: John Lawton on Feb 09, 2026, 11:48 AMThere is a 2025 snapshot on Wayback if that helps:

https://web.archive.org/web/20250418103741/https://jontio.zapto.org/hda1/dsp.html


Wow, thank you John! This is exactly the same site, information there is very useful, now I have a site copy for future reference.

@Wimax I have not tested the DSP routines. If you have some time, take a look at the posted site snapshot, might be useful to you in future.

top204

#5
I have only just noticed that a directive is missing from some of the later dsPIC33 device PPI files. Namely, the end address of YRAM.

This is why the dsPIC33CK devices are giving a linker error for Y RAM boundaries.

I have now adjusted the compiler's ppi reading parser to counter-act this, so it will use the end address in the device if not present, and I will go through the ppi files and alter them for the next update.

However, open the file: 'P33CK256MP508.ppi', in the folder: "C:\Program Files (x86)\ProtonIDE\PDS\Includes\PPI\". But only open it in notepad.

And add a YRAMEND directive to it, as shown below:

RAMAMOUNT=24576    ; Total amount of RAM (in bytes)
CODEAMOUNT=0x2BD00  ; Total amount of Flash Memory (in bytes) read from the linker's .gld file
DMAAMOUNT=24576    ; Amount of DMA RAM (in bytes)
XRAMSTART=0x1000    ; Starting address of X RAM
YRAMSTART=0x5000    ; Starting address of Y RAM
YRAMEND=0x5FFF      ; End address of Y RAM
DMARAMSTART=0x1000  ; Starting address of DMA RAM (if any)


Notice that the text: "YRAMEND=0x5FFF      ; End address of Y RAM" has been added?

This will tell the compiler its limits when arranging Y RAM, and it will assemble and link correctly.

Note that the ADC operates differently on the dsPIC33CK devices, to the original dsPIC33 devices, so the code will not compile with the SFRs present in the sample code listings.

Regards
Les