Which microcontroller to learn after Teensy / Arduino? Need more power

Discussion in 'Embedded Systems and Microcontrollers' started by beammy, Jun 21, 2015.

  1. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    Hi,

    I've been developing an electronic music instrument based on a Teensy (suped-up 3rd party Arduino), and am now wanting to explore the world of higher-power microcontrollers.

    I want as much processing power and ram as I can get - this is all valuable when working with audio. Looking on Digi-key, the highest spec microcontrollers I can see are by Renesas and Freescale, and max out at around 400MHz and 3MB ram. Would these be my best choices?

    Which company's microcontrollers would be easiest to wrap my head around developing on? I realise that they'll all be significantly harder than Teensy / Arduino, but want to learn. Things I'll want to achieve are communicating via SPI and I2S, accessing an SD card, posing as a USB MIDI device, dynamic memory allocation, and ideally allowing end-users of my products to update the microcontroller's firmware via USB.

    Any recommendations or direction would be greatly appreciated :)
     
  2. NorthGuy

    Active Member

    Jun 28, 2014
    603
    121
    Your list of requirements doesn't sound like something which would require lots of processing power. Instead of looking for power, go back to DigiKey and find devices with built-in I2S and USB modules.
     
  3. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    PIC32 are good- starting at 50 MHz and upto 100 for the standard MX, 200 for the new MZ series.

    If you need analogue capabilities you should look at DSP and programable logic to support the MCU.

    Also instead of choosing a high-end MCU you can scale up by using several cores at once and serial links between them.

    High end MCUs arent as easy to buy and you need special softwares and equipment, once you got that working, and for instance want to work at it at home with an old laptop you got a problem, same when relocating etc.

    PIC32 isnt difficult, you can take a blank IC just add some capacitors that will be it, well the power supply isnt as easy when you use switchers, you need a filtering network and shield even a 10cm cable. You also can just wrap a wire around it and construct a suitable network to drain off interferences.
    Otherwise, I had it when putting the hand near the chip SMD carrier it would reset.

    3v supply well I inlined red LEDs from the 5v supply...easy thing. As the main switcher was running on 5v. Side effect you'd see when there is interference the brightness would fluctuate.

    USB stack is provided, SD card filesystem exists at elmchan can be ported easily.
    MPLABX provides templates too for starting up the PIC32 and do basic configuration. There is no code size limit at all even for the free version.
     
  4. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    Thanks for the replies.

    I really do need all the CPU power and ram I can get - I'll be doing DSP / synthesis, and wanting to store lots of audio samples in ram.

    Wouldn't using multiple cores with links between them just make the system much more complicated - I'd have to write separate firmware for each core, and update them all separately every time? Debugging would be hard?

    The idea of using a secondary DSP processor is intriguing - any recommendations for what chips I should look at?

    PIC sounds cool, but they don't seem to be better than Teensy by a big enough margin to warrant me making the jump. Teensy 3.1 is 96MHz / 64KB, and the next Teensy is likely to be 200MHz / 256KB.

    I realise that special software and hardware will be required, but I'm really very interested in learning high-end MCUs, so recommendations as to which of them would be the less difficult option would still be much appreciated :)
     
  5. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    use intel atom mainboard...
     
    indeedisuper likes this.
  6. NorthGuy

    Active Member

    Jun 28, 2014
    603
    121
    If you really need all the processing power you can get, which I doubt, you probably need to abandon microcontrollers and look at microcomputers, starting with Beagleboard and up. These are totally different beasts. They do give you lots more power. Unlike microcomputers, with microcontrollers, you typically don't summon huge general processing power, but look for MCUs which do what you need in hardware modules, which makes it very efficient. What sort of DSP do you need?
     
    Austin Clark likes this.
  7. bug13

    Well-Known Member

    Feb 13, 2012
    1,208
    38
    Look at Raspberry Pi2.
    I have done face detection and neural network on the Pi Mode B+ (or something like that), with decent speed. Pi2 is expected to be 6X faster than Mode B+.
     
  8. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,168
    The Pi2 is a very fast machine but you will need to use SMP processing techniques to really see it shine by dedicating cores to near real-time tasks. The Linux OS/MMU/L2 cache gets in the way but it's possible to make programs run in each core nodes L1 cache with very good isolation but I would still have a DSP engine separate from the PI on a controller bus.
     
    Austin Clark and bug13 like this.
  9. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    Thanks for the recommendations. Intel Atom, Beagleboard and Raspberry Pi appear to revolve around the use of an operating system though, and this seems to be something that I don't need at all for my projects. Additionally, I'm aiming to produce these products I'm developing in probably small quantities, and embedding a microcomputer in a commercial product seems a bit overkill.

    The DSP I'll be performing is mostly synthesis, involving creating and processing waveforms. I want to be able to have as many synth voices rendering simultaneously as possible, and I'd also like to switch to some better (but slower) filter algorithms than I'm currently using. I've already reached the limit of the Teensy 3.1's 96MHz, so am wanting something with significantly higher power, as well as more ram.

    I understand that microcomputers might be easier to use and have higher specs than microcontrollers, but yeah I guess since I'm wanting to embed this solution in a commercial product I'm still wanting to use a microcontroller. Sorry, I should have said that initially.
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    hmm the new pic32 MZ isnt exactly cheap if you plan to use more than one core. but it can work standalone. PIC32 has DMA too for external RAM.

    And still available as TQFP (though the MZ has many leads + fine pitch).

    How about a dual core system for starter and see how much you can max out of it? Since you use the RAM for samples, dedicate independent RAM for each core.

    The PIC32 is very powerful I think.

    Maybe a smaller controller with LCD as master then run the rendering on the two cores. Its not difficult to do software serial ports and saves you from digging into the hardware documentation.
     
  11. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    The top PIC32 MZ appears to be just 200MHz, which is good, but only double what the current Teensy has, and the same as it's been suggested the next Teensy will have. I'll give it some more consideration though. Is PIC a whole lot easier to use than the higher end Freescale and Renesas chips - is there a reason to use PIC over those?

    I do like the idea of being able to add external ram. As far as I've been able to google, Teensy can't do that.
     
  12. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,168
  13. NorthGuy

    Active Member

    Jun 28, 2014
    603
    121
    Anything can use external RAM. You simply access it through SPI (or PP if you need faster).

    The performance is not measured by MHz. Say dsPIC33EP has a DSP engine runs at 70MIPS, but can do one point of FIR filter in one cycle - e.g. 64-point FIR filter in 1us. At 44kHz, it wouldn't be a big deal to run 10 parallel real-time FIR filters, each 64-point long. You would probably need to go to 400MHz general purpose processor to beat this. And if you write your program in C/C++, you won't do it even with GHz processor.

    In MCUs hardware modules run in parallel - one does USB, other does SPI with DMA , another module does ADC, yet another does PWM for DAC etc. - processor doesn't get involved much. That's how hardware always beats software - it can do many things at the same time. Software is linear.

    Now, if you want a processor which can run all this through CPU with enormous sheer power, then you do need something really fast.
     
  14. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    Hmm, so maybe I'm looking for a DSP then. What would be a good choice in that case?

    I looked into the dsPIC33, but it appears not to be as fast as the PIC32's. This thread had some benchmarks comparing the two, but is very old:
    http://www.microchip.com/forums/tm.aspx?m=293191&mpage=3

    the dsPIC33 is also only 16-bit. Since I'm mostly doing my signal processing with 32-bit integers, this would mean it wouldn't perform so well, right?

    I'm also realising that Renesas and Freescale might not be good MCU choices because of a lack of a very active online community for either.

    Any other recommendations for DSPs or MCUs?

    Would I be likely to find a DSP that I can just use as my main MCU - also talking to all the other peripherals via SPI, so I still have just one MCU / DSP in total? Most of the task I'm trying to accomplish is just DSP, so could I maybe just tack the other stuff onto the DSP chip? Or am I really looking at having an MCU for the user interface, and a separate DSP for the audio?
     
  15. NorthGuy

    Active Member

    Jun 28, 2014
    603
    121
    Very hard to tell. I work with PICs so I know much more about them than about other MCUs. My opinion would be biased.

    If I were you, I would create a list of what I need - DSP, USB, I2S (or at least good SPI), ADC etc. etc. then would see if you can get it all in one chip - do a parametric search. It won't be many that fit all your criteria. Select few and look at the data sheets. Figure out if the chip can do what you want to do as fast as you want it. If not, you may need two or more MCUs interconnected together.

    Also look at development tools - IDE, compilers, OCD debuggers which are available for the chip. You may like some and you may hate others. Some may be free, some may cost lots of money.

    If your inputs are from ADC, they will probably be less than 16-bit, so 32-bit arithmetics may not be needed, although if you have 32-bit processor you get 32-arithmetics for free.
     
  16. beammy

    Thread Starter New Member

    Jun 21, 2015
    11
    1
    drvlas likes this.
  17. drvlas

    New Member

    Oct 16, 2015
    26
    5
    Great work! No plans to use such a powerful MCUs, but I think your guide helps somebody.
     
Loading...