Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why Arduino? Instead of an AVR microcontroller system.

Status
Not open for further replies.

mahesXtremeEngineering

Advanced Member level 4
Joined
Dec 17, 2011
Messages
103
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,832
What is the need to use an Arduino instead of a microcontroller system with AVR controller.. which will make the system more compact.
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,713
Reputation
3,456
Reaction score
1,678
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,372
The project began in Ivrea, Italy (the site of the computer company Olivetti), in 2005 to make a device for controlling student-built interaction design projects less expensive than other prototyping systems available at the time. As of May 2011, more than 300,000 Arduino units are "in the wild." Founders Massimo Banzi and David Cuartielles named the project after Arduin of Ivrea, the main historical character of the town. "Arduino" is an Italian masculine first name, meaning "strong friend". The English version of the name is "Hardwin".

Arduino - Wikipedia, the free encyclopedia

Its open code, open development,... Its like development platform for all kinds of thing and situations. I prefer project to be indipendent, without Arduino, Pinguino, Gremlino... and other such things. ;-)
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
I personally don't use arduino , I was used in working with native C code (codevision, winavr) before I learned about arduino and once you get used to one way of coding I don't think there s a reason to learn the other.

Arduino has the advantage of many libraries ready to use without requiring too much knowledge from the user (of low level settings) and I suppose that the hardware may be more convenient too with the shields you can use etc.
On the other hand native C if far more powerful becasue every single register is manipulated in the code (instead of the function layer used in arduino) and this is at the same time the disadvantage of using a native C ide, it is more powerful but more complicated to use.

An additional disadvantage of getting used to arduino is that you will have a very hard time if you try to jump to another platform in order to use a device like PIC or ARM based mcu, you will then need to learn everything from scratch since there are not any "arduino" for these.

I suppose that if you provide both arduino and winavr to a user who is not experienced we will have a much easier task with arduino but I'm afraid that the time he gains in the first steps he will have to fill in afterwards when he finds out that there is a limit to what can be done with arduino.

Alex
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
As far as I'm aware the code is written in C but many things are done with an added layer so for example when you set a pin to input or output instead of using PINA=0xff you use the pinMode() function ( Arduino - PinMode ).

I suppose the registers of the mcu are still defined with the same names so you can write directly to them but may prevent some libraries from working correctly and in addition if someone wants to write native low level C then why use arduino?

Alex
 

Tahmid

Advanced Member level 5
Joined
Jun 17, 2008
Messages
4,758
Helped
1,792
Reputation
3,576
Reaction score
1,651
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,539
Like Kripton2035 has mentioned, you can program the AVR using the ICSP connector.

This means that you can write a program for the AVR in AVR-GCC, mikroC, CodeVision, etc and burn the AVR with a programmer via the ICSP connector.

Hope this helps.
Tahmid.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
I don't see any relation of the physical size of the dev board with the actual compiler being used so I don't understand why the board size is mentioned.
I'm nor sure what the OP meant by "more compact", was it the code size or some other parameter.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,376
What is the need to use an Arduino instead of a microcontroller system with AVR controller.. which will make the system more compact.

I thought I should mention that the Arduino coding environment is no longer just for AVR devices. The Microchip PIC32 and other devices are now being supported:





I have coded a fair amount using the Arduino environment, as Alex mentioned it offers a layer of abstraction from lower level details, such as register settings, interrupt handling, etc.

Individuals who have coded in either Assembly or C Languages will usually find this "abstraction" somewhat restraining or cumbersome. The Arduino environment also offers a degree of Object Oriented Programming (OOP) above that of Standard C, however greatly limited compared to C++.

The code derived from Assembly followed by C Language is almost always more compact and efficient than a High Level Language (HLL) with more layers of abstraction.

BigDog
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,713
Reputation
3,456
Reaction score
1,678
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,372
One Chip Arduino

One chip (sized) Arduino « adafruit industries blog

One Chip Arduino at Arduino Praxis

**broken link removed**

one_chip_arduino.jpg one-chip-arduino-v2-0.jpg
 

mahesXtremeEngineering

Advanced Member level 4
Joined
Dec 17, 2011
Messages
103
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,832
I'm nor sure what the OP meant by "more compact", was it the code size or some other parameter.

I meant the physical size of the system.

Other than size, in Arduino definite ports of the AVR is already set for input or output. In a simple AVR we can adjust this and make the uC perfect to the particular application.
Hence an AVR alone is more flexible.
 

RF_Jim

Full Member level 3
Joined
Jan 6, 2012
Messages
156
Helped
39
Reputation
78
Reaction score
38
Trophy points
1,308
Location
Texas
Activity points
2,680
I meant the physical size of the system.

Other than size, in Arduino definite ports of the AVR is already set for input or output. In a simple AVR we can adjust this and make the uC perfect to the particular application.
Hence an AVR alone is more flexible.

As mentioned, the Arduino is meant as an education tool and device; many others, like myself (I am well versed in Zilog Z80 ASM - assembly language - doing real-time signal acquisition yrs back) find the utility of the Arduino product line a great addition to the toolset to get things done and get projects accomplished a lot faster without the need to 'spin a board' or two to support the task.

In past years I have also used the Tern SBC (single board computers) products like the the TD40 and MD40 but they are expensive and must use the Tern development tools (at the time; they are not cheap either).

Regards,

Jim (not just an RF head)
 

alexxx

Advanced Member level 4
Joined
Apr 17, 2011
Messages
1,013
Helped
273
Reputation
552
Reaction score
270
Trophy points
1,383
Location
Greece
Activity points
7,938
mahesXtremeEngineering said:
I meant the physical size of the system.
Yes, nothing more compact than a stand alone MCU. Nothing more flexible than pure old fashioned C (we are not talking about assembly right?). Also cheaper constructions are made with stand alone MCUs.
Quicker solutions using Arduino? Not always. Once the peripheral routines are gathered, then you just add files to the project even with low level C.
The positive aspects of Arduino, is that first of all when you face the challenge of a new board peripheral (memory, clock, GSM etc), you will spare time than write the file from the scratch, this is true. But even in that case, you don't change memories, clocks and modems every day. Furthermore the PCB layout with Arduino is simpler if someone uses SMD MCUs, as well as soldering. Finally Arduino gives the chance to fresh engineers of writing simple programs quickly. But after school, construction cost matters. Most propably they will be hired by a company that makes projects on simple C. Unfortunately there is no such thing as "Arduino code portability"...
 

p.luc

Junior Member level 3
Joined
Feb 7, 2012
Messages
25
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,283
Activity points
1,415
As happened to me, when going deeper/further in complexity, every arduino feature becomes a con instead of a pro. Like code size, or the need of in-circuit debugging.
With Arduino, sooner or later you'll need jump to the next level. From my point of view, the sooner the better.
 
  • Like
Reactions: alexxx

    alexxx

    Points: 2
    Helpful Answer Positive Rating

eladin

Newbie level 4
Joined
Nov 1, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
I bought the Chipkit Max 32 from digilent

as seen in this link



I am just starting to learn using it only as an arduino board

can I program it using the normal AVR tools?

In other words, did they modify it so that it only works with arduino stuff now?

sorry if I am not clear
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,376
can I program it using the normal AVR tools?

No, due to the fact it is a PIC32 and not an AVR.

However, you can write code and program the chipKIT MAX32 using any PIC32 compatible compiler, including:

**broken link removed**

MikroC Pro for PIC32

And using the ICSP interface available on the board.

In other words, did they modify it so that it only works with arduino stuff now?

No, you can use the ICSP interface available on the board, which allows you to circumvent the Arduino IDE.

BigDog
 
  • Like
Reactions: eladin

    eladin

    Points: 2
    Helpful Answer Positive Rating

eladin

Newbie level 4
Joined
Nov 1, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
Thank you very much, I appreciate your help
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,376
Keep in mind if you program the PIC32 directly using the ICSP interface, you may have to reinstall the Arduino Bootloader if you decide to use the Arduino IDE in the future.

Unless, of course, you prevent the entire flash from being erased which is the default and you map your code to be programmed in the appropriate flash sectors uninhabited by the bootloader.

BigDog
 
  • Like
Reactions: eladin

    eladin

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top