Author Topic: Compare different microcontrollers  (Read 6247 times)

0 Members and 1 Guest are viewing this topic.

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 386
Re: Compare different microcontrollers
« Reply #25 on: April 05, 2016, 03:25:47 pm »
Did it really take 17 posts before anyone pointed out that the ARM is 32bit?

I honestly feel bad for the poor souls devoting a second of their lives to learning PICs.
 

Offline joefarad

  • Contributor
  • Posts: 5
  • Country: us
Re: Compare different microcontrollers
« Reply #26 on: April 07, 2016, 04:27:40 am »
Hey EEVbloggers!

I'm an engineering student, and I had a discussion with one of my professors about different microcontrollers...
So last year, I had to make a working DC-engine, starting with only 2 magnets and an inductor, and everything needed to be powered from a microcontroller.
For that job, an easy Arduino Uno did the work, everything worked fine, 1000 rpm at only 5V with constant current of 75mA, could lift 3 kg (=6.6 lbs) without a problem.

This year, I need to make a power supply, an audio amplifier (class AB) and a constant current load all in 1 single machine, driven by a single microcontroller.
The professor said we needed to use the cy8ckit-049-42xx, with the reason that it's a quite nice microcontroller and easy to program...

The next week, I had a question, when I asked it at the professor, at one point I said: "For testing my code, I used a simple Arduino to try it out", and the professor answered that Arduino is trash!

So now... If you have something to make with a microcontroller (in general), which controller would you choose? The biggest, most powerfull one? Or would you look at only what you need?


Just some quick numbers:  :blah:

Other things:
   
Other things:
   

Really... Prototyping on Arduino is a useless endeavor, it isn't in any way close to your target platform.  You might as well program your project in javascript and run it on your IE browser for all that you will gain trying to prototype your project on an Arduino. 

You should primarily be trying to learn about the ARMv7-M architecture (same for the Cortex-M3, Cortex-M4, and Cortex-M7); ARM instructions set; all of the integrated devices; memory; interrupts; etc...

And also do it because your lab manager said to... You got a couple of months left?  Quit wasting time with the Arduino toy.  Better hurry and  Good luck!

What you missed in your original comparison (note the Apple A9) - from Wikipedia:

Key features of the Cortex-M3 core are:
ARMv7-M architecture[7]
3-stage pipeline with branch speculation.
Instruction sets:
Thumb (entire).
Thumb-2 (entire).
32-bit hardware multiply with 32-bit or 64-bit result, signed or unsigned, add or subtract after the multiply.
32-bit hardware divide (2-12 cycles).
saturation arithmetic support.
1 to 240 interrupts, plus NMI.
12 cycle interrupt latency.
Integrated sleep modes.

Silicon options:
Optional Memory Protection Unit (MPU): 0 or 8 regions.

The following microcontrollers are based on the Cortex-M3 core:
Actel SmartFusion, SmartFusion 2
Analog Devices ADuCM3xx
Atmel SAM3A, SAM3N, SAM3S, SAM3U, SAM3X
Cypress Semiconductor PSoC 5
Holtek HT32F
Luminary Micro LM3S1968
NXP LPC1300, LPC1700, LPC1800
ON Semiconductor Q32M210
Silicon Labs Precision32
Silicon Labs/Energy Micro EFM32 Tiny, Gecko, Leopard, Giant
Spansion FM3
STMicroelectronics STM32 F1, F2, L1, W
Texas Instruments SimpleLink Wireless MCUs (CC1310 Sub-GHz and CC2650 BLE+ZigBee+6LoWPAN)
Toshiba TX03

The following chips have a Cortex-M3 as a secondary core:
Apple A9 (Cortex-M3 as integrated M9 motion Co-Processor)
CSR Quatro 5300 series (Cortex-M3 as co-processor)
Samsung Exynos 7420 (Cortex-M3 as a DVS microcontroller)[14]
Texas Instruments F28, LM3, TMS470, OMAP 4470 (one Cortex-A9 + two Cortex-M3)
XMOS XS1-XA family (seven xCORE + one Cortex-M3)
« Last Edit: April 07, 2016, 04:29:31 am by joefarad »
- they'll stone you and say good luck...  -- R.Z.
 

Offline Sal Ammoniac

  • Frequent Contributor
  • **
  • Posts: 705
  • Country: us
Re: Compare different microcontrollers
« Reply #27 on: April 07, 2016, 06:15:27 am »
The following microcontrollers are based on the Cortex-M3 core:

This list is hopelessly outdated and shouldn't be relied upon.
Never trust a government that doesn't trust you.
 

Online stj

  • Super Contributor
  • ***
  • Posts: 1691
  • Country: gb
Re: Compare different microcontrollers
« Reply #28 on: April 07, 2016, 07:54:29 am »
Did it really take 17 posts before anyone pointed out that the ARM is 32bit?

I honestly feel bad for the poor souls devoting a second of their lives to learning PICs.

if you have to replace some obsolete TTL and you only need 8 or 14pins a pic does just fine.
not every job needs complex code - sometimes you just need a handfull of pins with some logic between them.

different tools for different jobs.
« Last Edit: April 07, 2016, 07:56:33 am by stj »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 4188
  • Country: us
Re: Compare different microcontrollers
« Reply #29 on: April 07, 2016, 09:43:15 am »

if you have to replace some obsolete TTL and you only need 8 or 14pins a pic does just fine.
not every job needs complex code - sometimes you just need a handfull of pins with some logic between them.

different tools for different jobs.

Or a CPLD...

Debugging:  If no debugging port is available, no problem.  My first step, on any bare iron project, is to get the UART up and running.  Then I grab a copy of "The C Programming Language" (K&R) and write some conversion routines like itoa(), puts(), putc(), getc(), gets() and so on.  I usually add some hex formats as well:  8 bit, 16 bit and 32 bit.  Now I can do some debugging output as I go along.  To do this, the startup code needs to work, the clock rates need to be set and the UART itself needs to be initialized.  Not a lot of work but sometimes a little datasheet reading helps.

Debugging Part 2:  If you don't put bugs in your code, you won't have to root them out.  Just a little something I picked up over the years.  Not that I am successful, mind you!  I just know I should do better.

Back to the datasheets.  One good reason for using a variety of chips is to get used to the stuff the manufacturers put out as a 'datasheet' or 'user manual'.  Some are better than others but when it gets down to the nits, a lot of reading occurs between the lines.

IDE:  There is no reason not to use something like Visual Studio.  At its core, it just runs makefiles.  Same with Eclipse although I find the Java implementation to be terribly slow to load.  Well, heck, I needed a coffee break anyway.

 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 14310
  • Country: nl
    • NCT Developments
Re: Compare different microcontrollers
« Reply #30 on: April 07, 2016, 09:50:40 am »
Why would you write your own routines? These are in the libraries which come with every C compiler! Still ARM controllers come in sizes between 8 pins and >200 pins from several big semiconductor manufacturers which also have similar peripherals (NXP is good at this). Learning one kind of controller with a wide variety of choices in peripherals gets you lightyears further than messing around with an 8 bit PIC and needing something else for a different job. Nowadays it is simple: ARM does it all whether it is low power or speed.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 2502
  • Country: us
Re: Compare different microcontrollers
« Reply #31 on: April 07, 2016, 09:52:42 am »
>
Quote
I need to make a power supply, an audio amplifier (class AB) and a constant current load all in 1 single machine, driven by a single microcontroller.
Quote
Prototyping on Arduino is a useless endeavor, it isn't in any way close to your target platform.  You might as well program your project in javascript and run it on your IE browser for all that you will gain trying to prototype your project on an Arduino.
I might argue with you on the usefulness of Arduino (which at least would be C), but instead I think I'll say that prototyping a project in javascript in a web browser isn't necessarily a horrible idea, depending on where in your project the complexity lies.  DSP-like algorithms might be good candidates (are these DSP-like problems, or do they involve interfacing to specialized external hardware?  I can't tell...)

Quote
You should primarily be trying to learn about the ARMv7-M architecture (same for the Cortex-M3, Cortex-M4, and Cortex-M7); ARM instructions set; all of the integrated devices; memory; interrupts; etc...
Certainly NOT!  First of all, the recommended chip has a Cortex-M0 core, which is ARMv6m.  Secondly, it seems pretty common to teach/use ARM chips in C without spending much time on the architecture or instruction set (because of those nasty differences between ARMv6, ARMv6-M, and ARMv7-M, and ARMv7E-M.)   The "integrated devices" are probably important, though...

Quote
because your lab manager said to
He said "professor", whose advice I'd take quite differently than a "lab manager"...  :-)
 

Offline joefarad

  • Contributor
  • Posts: 5
  • Country: us
Re: Compare different microcontrollers
« Reply #32 on: April 07, 2016, 04:16:24 pm »
Certainly NOT!  First of all, the recommended chip has a Cortex-M0 core, which is ARMv6m.  Secondly, it seems pretty common to teach/use ARM chips in C without spending much time on the architecture or instruction set (because of those nasty differences between ARMv6, ARMv6-M, and ARMv7-M, and ARMv7E-M.)   The "integrated devices" are probably important, though...

...the dog ate my homework. :0
- they'll stone you and say good luck...  -- R.Z.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf