Advice on Programming PIC Chip for Audio Synthesis and Modulations

Discussion in 'Embedded Systems and Microcontrollers' started by Michael Mostachetti, Jan 27, 2015.

  1. Michael Mostachetti

    Thread Starter New Member

    Jan 27, 2015
    Hey there,

    As my title describes, I would like to program chips for the purposes of digitally sampling incoming audio, modulating the audio in various ways and then outputting the audio. I'd also like to program chips to synthesize the basic audio waveforms. I'm quite new to this subject and I don't know if I need special dsPIC chips or if ordinary PIC chips will do. I'm sure whatever types of processing I'll be doing will be a BIG factor in this choice.

    I'm basically looking for guidance on where I should start to learn about programming PIC chips for audio purposes and if I'm on the right path for eventually programming chips to synthesize/modulate/filter/etc audio.

    I've purchased this book to learn a thing or two, but I'm not sure if purely learning how to make my computer synthesize audio will actually help me learn how to program a chip to do it.

    Any information is greatly appreciated and thanks for taking the time to read this.

  2. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    A standard PIC simply doesn't have the "bandwidth" to process audio waveforms.

    The dsPICs have MAC (multiply-accumulate) hardware that allow the implementation of signal processing filters at good speed. I don't work with audio or dsPICs, so I don't know the max data rate.

    Synthesizing waveforms will take memory (both quantity and speed). So a fast memory interface will be required as well.
  3. sevenfold4


    Jan 12, 2015
    I have personally used dsPIC Started kit :
    It was quite simple to set up and do some testing. You are still going to program with MPlab.
    You can use something like QED to design some filters
    To record your samples, i have found that the best program for that would be Goldwave
    This would be a good beginner setup, the programs you can use for free and the dsPIC does not cost too much, but is more than enough for you to start playing around with different audio samples. The quality of course is not the best, but it is good enough.

    So why am i giving you all these links? I believe that learning through practice is the best way to learn anything.
    You could set up some minor goals, like design a FIR filter and try it etc...

    Of course you still gonna need some good place to read.
    I personally used this book (and pick Digital Filters).
    And it was more than enough for me(my goal was to understands the basics of DSP)

    I hope this post will be helpful for you.
  4. MrChips


    Oct 2, 2009
    When processing audio signals you need two things, speed and lots of memory.

    High quality sound uses sampling rates of 44.1kHz and higher. At 40kHz sample rate you have 25μs in between samples to process the data. Thus you need a controller chip that is optimized for DSP.

    A music clip 3 minutes long will take up 3 x 60 x 44100 samples = 8MB.
    That is how much memory you will need to just store all of the data. To process the data, such as filtering, will demand even more memory.
  5. BobTPH

    Active Member

    Jun 5, 2013
    ThedsPIC33FJ128GP802 / 804 chips have a built in stereo audio DAC that has 16 bit resolution and 256x oversampling. This is great for putting out audio. Unlike PWM, no external filtering is required and all you need is a differential op amp to buffer the output. You can basically get CD quality audio out of this.

    I would highly recommend these chips for and audio work with PICs.