Difference between DSP and microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by Bamerni, Jan 30, 2019.

  1. Bamerni

    Thread Starter Member

    Jun 26, 2016
    50
    0
    Hello everyone

    I have a simple question
    What is the difference between DSP chip like TMS320xxxx, and microcontroller chip like Atmega328

    Thanks in advance
     
  2. RPLaJeunesse

    Member

    Jul 29, 2018
    49
    17
    DSP is a Ferrari, 328 is a Lada.
     
    Engin41 and Bamerni like this.
  3. Bamerni

    Thread Starter Member

    Jun 26, 2016
    50
    0
    :D
     
  4. Bamerni

    Thread Starter Member

    Jun 26, 2016
    50
    0
    very good, but my question what a DSP chip can do and that microcontroller couldn't do and vice versa
     
  5. MrChips

    Moderator

    Oct 2, 2009
    19,039
    6,117
    A DSP is optimized for speed, fast mathematical computations.
    A microcontroller is your Swiss army knife, good for all jobs.
     
    Bamerni likes this.
  6. Bamerni

    Thread Starter Member

    Jun 26, 2016
    50
    0
    you mean that all job implemented on DSP could be implemented on a microcontroller with slower speed
     
  7. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    4,214
    6,332
    MAC. Multiply/Accumulate.
     
  8. OBW0549

    Distinguished Member

    Mar 2, 2015
    2,932
    2,694
    MUCH slower speed.
     
    Bamerni likes this.
  9. 402DF855

    Active Member

    Feb 9, 2013
    68
    20
    Originally, DSPs, as the name suggests, were somewhat specialized parts used for digital signal processing; FFTs and filters and such, and as has been suggested, speed was a primary design factor. Microcontrollers, on the other hand, are more generic and come with a set of accompanying peripherals: serial interfaces, ADC/DAC, timers, counters, PWM, NVM, etc. Both have evolved of course. DSPs nowadays often have a lot of peripherals built into its design too. Still the trade offs remain mainly about speed, cost, and complexity.
     
    Bamerni likes this.
  10. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    4,214
    6,332
    As I tried to indicate in a prior post, the only thing that separates a standard traditional MCU from a DSP capable MCU is the presence of a MAC module. Nothing else matters.
     
    Last edited: Jan 30, 2019
    Bamerni likes this.
  11. MrChips

    Moderator

    Oct 2, 2009
    19,039
    6,117
    As @joeyd999 said.

    Intensive mathematical computations usually involve a lot of arithmetic on large volumes of data.
    Invariably, the math requires one to multiply and add the data.
    Hence the MAC hardware.
    MAC stands for Multiply and Accumulate.
    A DSP will have MAC hardware in order to perform this arithmetic efficiently.
    Microcontrollers do not usually have MAC hardware. Event thought an MCU might have hardware multiply, the instruction set is not optimized to do MAC. A DSP instruction set is optimized to use the MAC efficiently.
     
    Bamerni likes this.
  12. danadak

    Distinguished Member

    Mar 10, 2018
    3,394
    765
    The MAC of course stands out as key item in DSP operations. But along with that
    one usually wants DMA so that a DSP operating on a signal stream does not have
    to flow code thru a CPU to get the job done. No DMA slows down the max sampling
    rate one can have with a MAC fed by A/D via code.

    As far as distinguishing them, today some UPs offer a complete signal path of DSP
    like operations. An example Cypress PSOC has a peripheral to do FIR, IIR, and BiQuad
    filtering, along with a SAR A/D and DAC and OpAmps and Vref and analog muxing and........

    This is just part of what is on this chip (note DelSig A/D was used, also onchip is SAR
    which is faster and could have been used.) -

    [​IMG]

    Note there was a lot of work done on Digital Filters with a power of 2 constraint
    for pole zero locations. This technique can eliminate MAC as we think of it and
    use simple shifting rather than full up multiplier for sample computation. But this places
    constraints on realizability, eg. cannot be used in ALL specification goals.

    DSPs now exist with clocking rates into the Ghz region, TI, Analog Devices.

    Regards, Dana.
     
    Last edited: Jan 30, 2019
    Bamerni likes this.
Loading...