Hello all,
I totally agree with one of the posts above. You should definitely first decide, why you want to learn an embedded development. A career or a fun ? If you choose the "fun" way, then it does not matter what you choose and arduino seems to be a good choice. Kits like MSP430 launchpad or arduino have big support and community on the web and you can make your hobby electronic stuff much "smarter" with minimal effort. To get LED blinking takes usually few minutes including installation.
If you are thinking about career of embedded developer, then the answer might be more complicated. Let me please share my personal opinion based on my current experience with embedded development (mainly HW design and FW support) in the field of industrial automation.
Embedded developer should be familiar with "concept" of embedded programming, software architecture and each step of development. He should know his development tools (linker, compiler, IDE...) and hardware (PIC, AVR, ARM..) in detail. I am not saying, that you should learn assembler first, but it is definitely benefit. Only with assembler knowledge, you can understand devil's race condition problems, critical sections etc. "toolsuites" like Arduino hide a lot of basic and important work and do it for you, which is not right I think.
When you browse the web, you can find a lot of arguments what is better, if PIC, ARM, AVR or something else. Every developer, which has became to a true professional knows, that this is a topic with no answer.
We can not tell you what is better, because each MCU has its benefits like simplicity, robustness, availability,
package , power and lot of other criteria.
Past few years many hobbyists have been switching to an ARM based MCU. It is not generally bad, but it somehow "trendy". The desire to have an excellent chip shifts the true and practical knowledge of embedded development to a second track. When I check some projects on the web
(for inspiration) , I often find very poor (means unreliable) software/firmware, but some overkill processor with million megahertz is inbuilt
Let me give you an example I saw some time ago:
Simple heating system for aquarium - STM32 gets temperature from i2c temperature sensor and based on result drives relay. Nothing bad, but i2c communication does not have any state machine and simply in a loop waits for a
correct answer. (something like while( i2c_read > xxx )... ) but what happens, when sensor dies or your mum accidentaly cut the wire. Das it mean, that relay stays on and boil all your fauna and flora
?
There are very few reliable source code examples or design tips on the web and that is something you should focus on. The controlling system described above could be probably done with every controller on the market...
I mean
"why the hell we need led flashing application with 100 MHz chips in QFP packages ?!"We have a new girl - student in a company and she expressed her wish: "I would like to learn ARM programming". I asked her, why ARM and what she exactly means. She answered "it is modern and everybody wants it". I had to explain her, that it is better to start with something easier to configure and better learn how to make robust code, instead of _delay_ms(300) for LED blinking...
So let's go back to some serious recommendation:
- Look, what kind of chips are available in your local store, or how you can get more of them.
- I suggest to learn ansi C language - it is most common programming language for embedded.
- Consider packages - ARMs might work for you, but only few of them are in DIP package which can be used in breadboards with no problem.
- Focus on toolchain availability - opensource (benefit of AVR,)
More specifically:
ARM
+ modern, opensource toolchain (GCC+ OpenOCD)
+ cheap boards available (Discovery Kit, Launchpad)
- packages are usually not so friendly for breadboard
- configuration (startup code, initialization, time domains) is not super friendly for newbies
PIC (18F, 24F)
+ cheapest (?)
+ every chip in several different packages
+ Pickit 3
+ big portfolio
+ easy to start
- free compilers provide not extra efficient code (eg. SDCC)
- development is closely coupled with MPLAB IDE
AVR
+ cheap
+ different packages (but not as good as Microchip)
+ easy to start
+ opensource toolchain supported in AVR studio
- not sure about open source debugging
MSP430
+ launchpad available
+ opensource toolchain available or CCS without code restriction (for G series)
- not as cheap as expected from value line
- very slow debugging (experience with launchpad), not extra stable
- too much stuff in errata .....
PS: I usually start development with PIC18 or PIC24.
regards
Jiri