6
\$\begingroup\$

I'm trying to get into microcontrollers, but as you might guess, choosing the first microcontroller to start with is a difficult task due to the many great choices available.

I have studied electronics (both analog and digital), computer organization and I'm presently reading a book on computer architecture.

What better way to cement my understanding than having a real microcontroller at hand. I have been tempted to get Arduino due to its popularity and its purported simplicity. However, just like programming in something like C# and not necessarily knowing what happens behind the scenes, I'm apprehensive that with Arduino, I'll only been using it like C# without understanding how the architecture works which is what I'm hoping to learn.

So, in short, am I wrong in my above assessments of the Arduino above?, and how does the Arduino compare in terms of understanding how embedded systems work to other microcontrollers from the PIC and AVR families.

Thanks

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Arduino is AVR. It just gives you a collection of library functions you can use to make your life easier. \$\endgroup\$
    – Majenko
    Commented Mar 14, 2015 at 19:28
  • \$\begingroup\$ Should I get an AVR development board or an Arduino ? \$\endgroup\$
    – medwatt
    Commented Mar 14, 2015 at 19:36
  • 1
    \$\begingroup\$ An Arduino is always handy to have around regardless. It can be used as a programmer for raw AVR chips, and it is an easy path in to learning - you can start with the basics using their API and gradually reduce your reliance on it and program the bare metal without having to worry about the supporting circuitry, hardware programmers, etc. \$\endgroup\$
    – Majenko
    Commented Mar 14, 2015 at 19:37
  • 2
    \$\begingroup\$ Arduino is a software/firmware development system that appeals to a broad (non-engineering) audience, so unfortunately they use nonstandard terminology: sheild means plug-in board, sketch means firmware program. processing and wiring are names of some of their libraries. And fritzing is a breadboard wiring diagram, often used as a poor substitute for a real schematic. But aside from the weird names, it is a capable development tool. And since it is open-source, you can dig into the source code and see how things work under the covers. \$\endgroup\$
    – MarkU
    Commented Mar 14, 2015 at 21:26
  • \$\begingroup\$ @MarkU Actually, processing is the name of the IDE they stole, and wiring is the name of the API they stole. \$\endgroup\$
    – Majenko
    Commented Mar 15, 2015 at 1:02

3 Answers 3

7
\$\begingroup\$

Unless you are on an extremely tight budget (like saving-pocket-money levels), then I wouldn't sweat the decision of which to try first too much. Just pick one, and expect that once you've started you will try others.

IMHO you can't really go wrong with an Arduino as a first choice:

  • Precisely because of its popularity and its purported simplicity (when compared to PIC) you will find a wealth of information and support on the net
  • And with the standard IDE you can pretty much bank on an encouraging first experience as you actually get to make it do stuff (compared with going straight to an AVR chip).

So it is unlikely you will fall at the first hurdle and be disenchanted and frustrated as a result.

Do not worry too much about getting stuck in a black box that prevents you learning to deeper levels. But the onus will be on you to push beyond the basics e.g.:

About the only downside of starting with an Arduino I can think of is having to suffer the occasional disparaging remarks and trolling by Real™ Engineers! Kind of like programmers admitting their first language was BASIC;-)

\$\endgroup\$
3
\$\begingroup\$

If you get an Arduino Uno or similar board, you can completely ignore the fact that you can use the Arduino IDE to program it, and you can write all your own code in Atmel Studio and even import the Arduino core libraries into that if you wanted.

The good part about Arduino is you don't have to learn the low level stuff, like how to enable interrupts and set masks for timer registers etc. It just "works".

This helps noobs get started, and get things done quickly.

If you want to learn the proper way from the beginning, go straight into Atmel Studio with a AVR dev board (or use an Arduino board, just ignore the IDE) and learn from examples and read the datasheet for the Atmel AVR ATMEGA328P.

\$\endgroup\$
3
  • \$\begingroup\$ So, its possible to use the ATMEGA328P chip independently ? \$\endgroup\$
    – medwatt
    Commented Mar 14, 2015 at 19:40
  • 3
    \$\begingroup\$ you are always using the Atmega328P, in both Arduino and other IDE. It's just that Arduino has purposefully abstracted away the hardware and tried to make a higher level programming interface, which is cool and allows them to have many different products all using the same code. \$\endgroup\$
    – KyranF
    Commented Mar 14, 2015 at 19:42
  • \$\begingroup\$ @KyranF which is the very "essence" of programming and more "seasoned" engineers should acknowledge that instead of talking down to Arduino-kiddies. OpenGL and DirectX is a very similar paradigm. Abstracting the hardware away to allow (gasp..even beginner) programmers to use it. +1 \$\endgroup\$
    – cbmeeks
    Commented Nov 21, 2017 at 21:07
1
\$\begingroup\$

If you want to program microcontrollers, you need to learn (if you don't already know) 'C' and arguably some assembly language.

Arduino is good if you just want to get something working (i.e. want to earn just enough programming to get the job done), which is fine. The language that arduino uses is C-like, but has a bunch of canned routines so you don't have to know what's going on under the hood.

If it's control and deeper understanding, get a microcontroller dev kit (either from the manufacturer or digikey). Typically you can get this for USD $30-50 or less.

For learning embedded C, check out the following books: Embedded C, Test Driven Development for Embedded Systems and embedded systems

Start by trying to solve a problem. I've gone through books and gotten bored and didn't retain as much as I did by trying to solve a problem. Good luck and have fun!

\$\endgroup\$
2
  • \$\begingroup\$ But your answer somehow contradicts that given by KyranF, who said I can use the Arduino just like a regular ATMEGA328P if I use Atmel Studio instead of the Arduino studio. Why buy an AVR dev board then ? \$\endgroup\$
    – medwatt
    Commented Mar 14, 2015 at 19:59
  • \$\begingroup\$ @medwatt you CAN use the arduino board to just develop normal C code in Atmel Studio. So you can't really lose by going for an Arduino board \$\endgroup\$
    – KyranF
    Commented Mar 14, 2015 at 20:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.