Pages: [1] 2 3   Go Down
Author Topic: Differences between ARM3 and Microcontrollers  (Read 3540 times)
0 Members and 1 Guest are viewing this topic.
Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have been thinking about getting an Arduino Due lately.  Mainly because of the 32-bit (figured its better) and the faster clock.  But seeing as how I can't sleep for some reason, I started thinking "What are the key differences between an ARM3 Processor and a Microcontroller? (Namely whats different about programming it and just working with it)

I've always worked with 8-bit microcontrollers and I have a project that could use a beefier processor and I know there are some differences that affect each aspect of the design process.

So anybody?
Logged

Accelerate to 88 miles per hour.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not as much difference as you might think. The machine code is radically different but you are insulated from all that with C. The interrupt structure again is diffrent with IRQ, and fast being maskable and non maskable and also havinfg a SWI or software interrupt, but again the Arduino team have done a good job at minimising that.
The big difference in the Due is the preiphals, more of them.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 130
Posts: 8621
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're writing code at the "Arduino" level I doubt there's any difference, apart from the fact that there should be a lot of neat new libraries before long.

If you are actually writing these libraries and/or dealing with the IO there's a big difference. But then technically the peripherals aren't the "ARM", they are stuff added to the ARM by the likes of Atmel, NXP et al.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5757
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been thinking about getting an Arduino Due lately.  Mainly because of the 32-bit (figured its better) and the faster clock. 

The answer should depend on what you plan to do with it, which of course you aren't saying (don't feel bad, nobody ever does...)

What are the key differences between an ARM3 Processor and a Microcontroller?

The Due has more RAM and more processing power, obviously. You might need that if you're making robots that need artificial vision or other projects that do a lot of math or manipulate large amounts of data. You also get more built-in peripherals, I/O pins, etc. Don't even think of connecting a 5V peripheral to one of those pins though or you'll be buying a new Due.

The AVR Arduinos make much more sense for controlling LEDs and general projects of the sort "read a sensor and use the information to control something else". They can take a LOT more electrical abuse than the ARM (and you can replace the chip for $3 if you ever do manage to blow it), you can make standalone versions of your gadgets for the price of a chip plus a piece of perf-board, you can get tiny Arduinos for small spaces, etc., etc. There's also way more web community for AVRs than ARMs.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
   
Differences between ARM3 and Microcontrollers

Simple: you cannot get an ARM3 chip and you can get plenty of Microcontrollers.
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are lots of ARM micro-controllers.
Logged

Leon Heller
G1HSM

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have been thinking about getting an Arduino Due lately.  Mainly because of the 32-bit (figured its better) and the faster clock.  But seeing as how I can't sleep for some reason, I started thinking "What are the key differences between an ARM3 Processor and a Microcontroller? (Namely whats different about programming it and just working with it)

I've always worked with 8-bit microcontrollers and I have a project that could use a beefier processor and I know there are some differences that affect each aspect of the design process.

So anybody?

I think your better to focus on the physical differences between a ARM based controller board and your standard arduino 8 bit board. Questions such as:

Do I need to use an existing shield board and will it work with the Due I/O voltage and current differences from the AVR 8 bit chips.

Do I need to modify any 3rd party libraries I use on my present arduino board such that they will work with a arm based Due board.

 Both will be programmed from the latest version of the arduino IDE using the gcc C/C++ compiler so your software experience and skills should transfer over with little problems I would think.

Lefty
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
   
Differences between ARM3 and Microcontrollers

Simple: you cannot get an ARM3 chip and you can get plenty of Microcontrollers.


Oh I can, I did a lot of research last night.


Well one thing I really like about the arduino platform is the support for it.  They even have an article on how to get off the arduino board and onto a standalone controller.  I would like to make this thing all on its own pcb.  ARM3 and all needed ICs, I just haven't found any way on how to do that.  I don't know how an ARM3 gets programmed.  Is it like the arduino where I can do it the ICSP?  To my understanding its not the same architecture at all. 

The answer should depend on what you plan to do with it, which of course you aren't saying (don't feel bad, nobody ever does...)

Sorry, I've been here long enough to understand your pain.  I must have been brain-dead but still not able to sleep.  Basically I'm taking in sensor data through I2C from 2 chips and using those to control a few other pieces of components for output.


Honestly the reason I want to go from AVR microcontrollers to an ARM is because I don't want my processor running at full speed all the time.  Its a battery powered application and I need the batteries to last as long as possible.  I could use the QP event driven framework I guess, but I doubt I'd understand it to a point where I could use it and I haven't seen many people discussing it around here.
Logged

Accelerate to 88 miles per hour.

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Besides the Due, there are quite a few other Arm processors out there, with different features.  I happen to have the Teensy 3.0 (http://www.pjrc.com/teensy/index.html) myself that uses the Arduino IDE.  I bought it on a whim when it was in the kickstarter phase, but it does seem to work fine.  I do have some minor issues with it with how it is programmed under Linux, and I need to deal with devices running at 3.3v instead of 5v.  However, being able to be dropped in a breadboard is more convenient than the Uno is some cases.

However, you might want to step back, and look at whether your current hardware is too slow or you don't have enough memory.  For a lot of things people use Arduinos for, speed is not an issue, since they are waiting for external events.  If you are doing audio processing (other than using a wave shield to play a pre-recorded sound), you probably find the Arduino challenging in that it probably can't keep up with the speed, and it likely needs more memory as well.

On the other hand, if you want to do video processing, both the Due and the Teensy 3.0 are too slow, and you need to step up to something faster.  The Raspberry Pi runs at a much faster clock rate (700Mhz vs. 84Mhz for the Due and 16Mhz for the Uno), and has much more memory (originally 256 megabytes, now 512 megabytes).  However, for really high speed video, the Pi might be limited because the GPU is not completely open.  However, there are tradeoffs in running on the Pi (the default OS is Linux rather than running on bare metal, but there are ways to run bare metal, and the GPIO pins are more limited than the Arduinos).

It all depends on what you need, and whether you are willing to do things differently than before.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5757
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Honestly the reason I want to go from AVR microcontrollers to an ARM is because I don't want my processor running at full speed all the time.  Its a battery powered application and I need the batteries to last as long as possible.  I could use the QP event driven framework I guess, but I doubt I'd understand it to a point where I could use it and I haven't seen many people discussing it around here.

I would have thought AVR chips were better for low power consumption than ARM. 32-bits is a disadvantage for that. You can get AVR power consumption down into the microamps with a bit of work (use sleep mode with interrupts to wake it up).

The main wastes of power on an Arduino Uno are all the power supply circuitry and the second AVR chip (the ATmega which does the USB-to-Serial interface).

You can avoid this by using something like a Pro-mini, or get a more bare-bones Arduino board, eg. this one:  http://evilmadscience.com/productsmenu/tinykitlist/180

One of those in sleep mode will last an awfully long time on batteries.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well one thing I really like about the arduino platform is the support for it.  They even have an article on how to get off the arduino board and onto a standalone controller.  I would like to make this thing all on its own pcb.  ARM3 and all needed ICs, I just haven't found any way on how to do that.  I don't know how an ARM3 gets programmed.  Is it like the arduino where I can do it the ICSP?  To my understanding its not the same architecture at all.  
You need to look at an individual ARM implementation.  There are many different vendors that have different features and different ways of doing things.

For example, the Teensy 3.0 that I mentioned in my other post (http://www.pjrc.com/teensy/index.html) is programmed by running a variant of the Arduino IDE.  You hit the button to compile and download the application, and then it prompts you to push the reset button.  When the reset button is pushed, it causes the Teensy to run the bootloader, and the bootloader changes the USB id to tell the system to download the image.

The Teensy 3.0 has holes that you can solder in the appropriate pins with the 0.1" spacing for standard breadboards or PCBs.  Or you pay them a little more and they will solder the pins in directly.  Power is done via the micro USB port or you can cut a trace and power it via the VIN pin.  There is a separate forum for Teensy support over at pjrc.com.

Mbed (http://mbed.org/) is another arm setup for rapid prototyping, that has a different way of doing the programming.
 
« Last Edit: December 14, 2012, 12:00:30 pm by MichaelMeissner » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you cannot get an ARM3
Proper terminology is "ARM Cortex M3" microcontroller.  It implements the ARMv7-M architecture.  Not all of the "next generation" Arduino-like boards have Cortex M3.  Teensy 3.0 has Cortex M4, which adds some DSP instructions, and the Freescale Freedom has a Cortex M0+, which is less powerful (at least by some measures.)

Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Oh I can, I did a lot of research last night.

Then you need to redo your research.

Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Oh I can, I did a lot of research last night.
Then you need to redo your research.

You aren't helping one bit.  Stop post farming or help.


I would have thought AVR chips were better for low power consumption than ARM. 32-bits is a disadvantage for that. You can get AVR power consumption down into the microamps with a bit of work (use sleep mode with interrupts to wake it up).


Hm, that is a really good point!  I've never worked with interrupts.  Never quite grasped them. I've gotten pretty far without needing them though.  Do you have any resources for learning them besides arduino pages?
Besides the Due, there are quite a few other Arm processors out there, with different features.  I happen to have the Teensy 3.0 (http://www.pjrc.com/teensy/index.html) myself that uses the Arduino IDE.  I bought it on a whim when it was in the kickstarter phase, but it does seem to work fine.  I do have some minor issues with it with how it is programmed under Linux, and I need to deal with devices running at 3.3v instead of 5v.  However, being able to be dropped in a breadboard is more convenient than the Uno is some cases.

However, you might want to step back, and look at whether your current hardware is too slow or you don't have enough memory.  For a lot of things people use Arduinos for, speed is not an issue, since they are waiting for external events.  If you are doing audio processing (other than using a wave shield to play a pre-recorded sound), you probably find the Arduino challenging in that it probably can't keep up with the speed, and it likely needs more memory as well.

On the other hand, if you want to do video processing, both the Due and the Teensy 3.0 are too slow, and you need to step up to something faster.  The Raspberry Pi runs at a much faster clock rate (700Mhz vs. 84Mhz for the Due and 16Mhz for the Uno), and has much more memory (originally 256 megabytes, now 512 megabytes).  However, for really high speed video, the Pi might be limited because the GPU is not completely open.  However, there are tradeoffs in running on the Pi (the default OS is Linux rather than running on bare metal, but there are ways to run bare metal, and the GPIO pins are more limited than the Arduinos).

It all depends on what you need, and whether you are willing to do things differently than before.

I have seen the Teensy before.  I looked into it while the Due was still being waited on.  Issue with that is I still will have trouble getting off of the bootloader kind of platform.  And i'm still just as clueless with an ARM.

I won't be doing visual processing at all.  Its just a few leds and sensing capabilities.  The thing that gets me still is the power consumption, like the guy said earlier, I could use interrupts to solve that, although I will then run into another problem with clock speed.  This will be powered by a LiPo battery (3.7v) and to get the ATmega32u4 or 328p up to 16MHz clock speed, I need the full 5v.  I've never done a buck-boost application or basic transistor stuff.  Is there a simple solution that can solve that or would an 8MHz clock speed be okay for just sensing with gyro, megneto, and accel sensors?
Logged

Accelerate to 88 miles per hour.

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I won't be doing visual processing at all.  Its just a few leds and sensing capabilities.  The thing that gets me still is the power consumption, like the guy said earlier, I could use interrupts to solve that, although I will then run into another problem with clock speed.  This will be powered by a LiPo battery (3.7v) and to get the ATmega32u4 or 328p up to 16MHz clock speed, I need the full 5v.  I've never done a buck-boost application or basic transistor stuff.  Is there a simple solution that can solve that or would an 8MHz clock speed be okay for just sensing with gyro, megneto, and accel sensors?
This is a guess, but I suspect unless you are tracking really fast objects, that 8Mhz is probably still overkill.  If you haven't seen it, Nick Gammon wrote a piece on how to do low power in Arduino class processors: http://www.gammon.com.au/forum/?id=11497
Logged

Pages: [1] 2 3   Go Up
Jump to: