Differences between ARM3 and Microcontrollers

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?

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.

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

funkyguy4000:
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...)

funkyguy4000:
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.

Differences between ARM3 and Microcontrollers

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

There are lots of ARM micro-controllers.

funkyguy4000:
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

dhenry:

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.

fungus:
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.

Besides the Due, there are quite a few other Arm processors out there, with different features. I happen to have the Teensy 3.0 (Teensy USB Development Board) 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.

funkyguy4000:
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: Diavolino

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

funkyguy4000:
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 (Teensy USB Development Board) 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.

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.)

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

Then you need to redo your research.

dhenry:

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.

fungus:
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?

MichaelMeissner:
Besides the Due, there are quite a few other Arm processors out there, with different features. I happen to have the Teensy 3.0 (Teensy USB Development Board) 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?

funkyguy4000:
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: Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors

Okay, I'm going AVR. That is probably the best article I've ever read!
One question, I was hoping that I could have the leds kinda dimly fade in and out when the whole thing is in power save mode but then be controllable by a TLC5940 when it isn't in power save, but rather being used. Is there a way I could send the 5940 fade data and just have it loop while the ATmega is in power save mode? (I guess what I'm asking is once the data has been shifted into the 5940's register, could I just supply it with power, put the ATmega to sleep, and have the fades still loop?)

(I guess what I'm asking is once the data has been shifted into the 5940's register, could I just supply it with power, put the ATmega to sleep, and have the fades still loop?)

No, because the TLC5940 needs a external clock from the processor. If it goes to sleep the clock stops.

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

Ah, not come across that term before, you are certainly right.

I just made the term up, I used to play a lot of video games and that was the general term for actions such as that. (action) - farming

Anyway, I know this topic is called anything related to the TLC5940 or lighting, but is there something I could use that would be able to fade all 3 leds of 4 RGB leds that can do what I need? I've done quite a lot of looking around in my spare time, and although I've never looked specifically for an IC that doesn't need the clock signal, i've never seen one.

funkyguy4000:
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?

Does anything else need 5V? Boosting is easy - just buy a 5V boost board.

OTOH you're trying to use as little power as possible so running at 8mHz is best if nothing else needs 5V. 8mHz is plenty fast enough for reading a few sensors.

Actually, nothing will be running on 5v.
The whole thing will be powered by a 3.7v LiPo.

I remember I once tried to burn a bootloader for an ATmega328p on a breadboard for 3.3v use at 8MHz and I couldn't get the darn thing to work. Since then, I haven't figured it out.