General Question: How to learn DSP programming

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
gbtjom
Posts: 58
Joined: 13 Jan 2012 23:48

General Question: How to learn DSP programming

#1 Post by gbtjom » 05 May 2014 21:59

Hello

I have a question related to DSP. I've noticed it is not trivial to learn DSP...specifically the programming side of things. I've looked at a number of the examples from the LIBSTOCK for the DSPic 33 devices using MikroBasic but most of them are just generic ports for some of the peripherals such as SPI or the TFT etc etc.

What I'd like to know is how one learns to program the DSPic for, say, filtering? Let's say, for example, I what to try a simple low pass filter (FIR or IIR or whatever). I can use the EZ Fusion Pic7 dev board I have and then I can bring in an analog signal into the DSPic33 ADC, process the filter then output the data to a DAC Click board. I got much of it to work but the "process the filter" part was confusing to me. I did not know how to implement the filter. Is there a simple example for this somewhere? What then would I do if I wanted to implement a Hilbert Transform (single side band radio) or other more complicated setups? That becomes even more daunting.

It seems like this should be relatively easy for simple filter but I had trouble. Besides that I'm sure timing issues (ie sampling etc) I'm not aware of I'm missing also. What is might also be needed is some sort of algorithm (non-language specific) on how to implement such code. Often you see "C" programming examples which are next to impossible to figure out if you don't know "C". A algorithm is far more useful.

Any help would be appreciated. :D

jom

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: General Question: How to learn DSP programming

#2 Post by aCkO » 06 May 2014 00:48


gbtjom
Posts: 58
Joined: 13 Jan 2012 23:48

Re: General Question: How to learn DSP programming

#3 Post by gbtjom » 06 May 2014 01:10

Thanks for that. Since I prefer Basic I found that book as well.

Any other thoughts or ideas?

Thanks again!

jom

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: General Question: How to learn DSP programming

#4 Post by marina.petrovic » 06 May 2014 14:27

Hi,

In our dsPIC compilers we provide DSP libraries (and some simple DSP example) that can help you.
mikroBasic PRO for dsPIC30/33 and PIC24 Libraries -> DSP Libraries

Also, you can use compiler Filter Designer Tool (compiler Tools) that you can use for designing FIR and IIR filters.

Best regards,
Marina

gbtjom
Posts: 58
Joined: 13 Jan 2012 23:48

Re: General Question: How to learn DSP programming

#5 Post by gbtjom » 06 May 2014 20:07

Thanks Marina!

Can you tell me what you mean with this:
mikroBasic PRO for dsPIC30/33 and PIC24 Libraries -> DSP Libraries
I'm not sure if that was supposed to be a link or what.

Thanks again!

jom

gbtjom
Posts: 58
Joined: 13 Jan 2012 23:48

Re: General Question: How to learn DSP programming

#6 Post by gbtjom » 06 May 2014 22:26

A side note here: I've spend a bit of time playing with your Filter Designer program. It seems to have some issues.

An example: when you try to design, say, an IIR filter the Butterworth only lets you adjust the ORDER. If you then change the menu to Chebyshev a new set of entry boxes appear. Then if you go back to Butterworth the entry boxes stay. They aren't consistent though since Butterworth filters don't have ripple. Also, if you accidentally set a Chebyshev filter ripple to 0 it will crash the program. I mean, the WHOLE program not just the Filter designer. If I hadn't saved my code that would have been frustrating. :?

jom

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: General Question: How to learn DSP programming

#7 Post by marina.petrovic » 07 May 2014 12:08

Hi,

Sorry, perhaps I was not clear enough, I suggested you to take a look at compiler Help file - DSP Libraries.

The Filter Designer Tool is older tool originally made for dsPIC30 microcontroller.
Unfortunately, tool have some flaws but I hope that they will be corrected in one of the future compiler release.

Very tool can help you to see the logic of the filter design.
Also, you can take a look at simple DSP example from compiler:
...\mikroBasic PRO for dsPIC\Examples\Digital Signal Processing

Best regards,
Marina

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”