I've been working with arduino for about a year and I started on pi a month ago. I've programmed for ios, Android and asp/php programming and I know a fair bit about computers frim school and college courses.
I'm interested in knowing what the operational difference between an Arduino and a Raspberry pi is in sort of technical but not too technically sophisticated terms.
What I understand is that an Arduino has a atmel chip which has a firmware loaded onto it. I'm not sure what that firmware is or how it works but I understand it has to do with how atmel programs it's chips even though you can mess with it. Basically the Arduino powers up and is ready to accept whatever code you load onto it.
A pi, much more like a computer, has a bootloader program or firmware which has as one of its tasks to load an operating system from a hard drive.
Does that sound about right?
At Arduino takes much lower level commands from us to control ins and outs whereas a pi/computer takes much higher level commands. But basically the atmel328 chip is the equivalent of the intel x86 chip?
And whatever code we write in the Arduino ide gets translated to whatever the atmel chip speaks much like a c program gets translated into whatever the Intel chip speaks?
But in the end, the chips take compiled code and translate that into 1's and 0's based on the firmware loaded onto the chip?
A pi, much more like a computer, has a bootloader program or firmware which has as one of its tasks to load an operating system from a hard drive.
Yes, the Raspberry Pi is a complete computer. I'm not sure if an operating system is required but it can run one, and it has ports for a mouse, keyboard, and display.
The Arduino is more low-level. It doesn't have an operating system and it's more for embedded systems where you need a microcontroller to do something specific without a traditional keyboard, display, or hard drive.
At Arduino takes much lower level commands from us to control ins and outs whereas a pi/computer takes much higher level commands. But basically the atmel328 chip is the equivalent of the intel x86 chip
And whatever code we write in the Arduino ide gets translated to whatever the atmel chip speaks much like a c program gets translated into whatever the Intel chip speaks??
At the processor level, they are both running machine language. C/C++ programs (or another high level language) is compiled to machine language. You can use C/C++ to make a program for either platform, but there are machine-specific C++ commands (especially for the Arduino) and each uses a different complier to create the specific machine language binary for the particular machine.
a Pi is going to be much more like a cellphone, in terms of resources and capabilities, particularly since it is generally used with linux running on it.
The Arduino, particularly the Atmel boards have very limited resources in comparison.
Arduinos are great for simpler task that need to control things, perhaps very much in reatime, or need very fast boot, and reset startup times.
A big difference between them particularly the when comparing the Atmel AVR vs something like like Pi is the amount of resources available for code and data.
An AVR typically has 32k up to 128k of flash for code and 2k up to 16k for RAM.
(not MB or GB but kbytes)
The AVR does not allow running code in RAM and does not support direct data access to flash.
i.e. code is in flash and data must be in RAM.
This limitation really wonks up your code when using const data as you cant just declare it const and have it exist only in flash and then access it directly or use pointers to access it.
Well you can try use const like normal processors and it does work, but if you do, the const data will exist in both the flash and in RAM to allow direct access to to the RAM version.
To work around this h/w architecture limitation, which is important since RAM is so limited, Atmel supplies some special macros when declaring the data to keep it from being moved to RAM.
And then the code must use special access functions to get to it rather than simply use a pointer.
Having to use access functions is what really wonks up your code.
There other Arduino boards that use other processors like ARM or PIC32 that do not have this const limitation since they can directly access data stored in flash.
You are talking about functions such as pgm_read_word(), right? PROGMEM is not a necessary part of Arduino programming. It's included to facilitate shrinking the size of a program. On bigger machines, you don't need to do that. On an 8 bit Arduino, it's a good thing - you can cram more into the little bit of RAM the chip has.
Right but the atmel is a microprocessor just like the intel core i7, but with large differences in capacity and power. But they both boot up when powered on, by running an on chip program of some kind preloaded by the manufacturer?
'328P boots from on-chip program area. Others boot from offchip storage area.
Other big difference (beside clock speed) is operating voltage of the IO: "normal" Arduino is 5V, can buy a ProMini at 3.3V.
RPi is 3.3V.
Intel core i7 is likely 1.8V, 2.5V, something low like that.
Yes I am aware of the speed and capacity difference, that's why I mentioned it. My question is more oriented towards functional differences in terms of how they work from boot up like how each one boots up and what they do with code they run.
Like crossroads mentioned that atmel boots off of an on chip area whereas he Intel boots off an off chip storage area. What exactly does that mean?
For example, in this motherboard, doesn't the and boot off of a firmware in that amd chip?
Robin2:
And a Fiat 500 and a TGV can both carry people.
...R
Last year I thought I wanted to buy a Fiat500. I like small cars.
I went to a dealership, and asked for a test drive. They want to come along these days. My girlfriend took one look inside and decided to wait for our return. I'm a big guy, fat and 6 foot. The salesman probably weighed as much as I do, but was maybe 5' 6". We, um, ... got in.
No the Fiat500 does not carry people. Person maybe.
I do not know the exact meaning of "diet" in English but it is a feeding mode and no quantity restrictions of food.
Mainly:
Avoid eating too much meat,
Eat fish,
Eat fresh vegetables,
Eat uncooked vegetables,
Eat lots of different kinds of vegetables,
do not eat fat, but season with uncooked olive oil
This is not "a diet" to lose weight but live a long live.
Bon Appétit
For the heart the best food are (according to a survey doneby the US) :
Red wine (exactly Bordeaux Médoc), drank in moderation one glass with cheese.
Duck or goose Foie gras,
Duck or goose confit
I tried to get reimbursed by the French National Health Service (French Sécurité Sociale)
but they never accepted .
Marciokoko:
Like crossroads mentioned the atmel boots off an onchip area whereas he Intel boots off an offchip storage area. What exactly does that mean?
Regardless of what the answer might be I can't see how this is relevant to the question in the Title.
It's a bit like wondering if a TGV has a starter key because a Fiat 500 has one