I want to get into embedded programming

As the title states, I'd like to start programming embedded systems. I'm really fascinated by robotics and that type of stuff. I have a Lego Mindstorm but I want to dig deeper into the area. I want to buy something that I can program and actually learn how it all works on a low level. I have a raspberry pi but I've read that they're not ideal for what I want to accomplish. If anyone could recommend stuff to get me started I'd greatly appreciate it.
I recommend ARM cortex-m0 or cortex-m3, like stm32, for example http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF250863?sc=stm32-discovery board, which include JTAG debug interface. Most of the vendors has their own version of cm3, like TI, Toshiba, Nuvoton, etc. You have free IDE compilers like Keil uVision, Atollic TrueStudio or open source Open OCD.

Why ARM? The answer is simple - arm cores are most popular in modern devices, and all version are similar to each other, so if you learn architecture of cortex-m0/3 you will easily switch to cortex-a8/9 +. Peripherals differ very little from vendor to vendor.

Then it is a matter of writing "stm32 programming tutorial" in google :).
closed account (z05DSL3A)
You could get yourself a few TI ARM Launch pad boards and set of books to learn from. Companies like Sparkfun{1} do small breakout boards for various sensors and actuators. There is also a learning section there.

The books are:
Embedded Systems: Introduction to Arm® Cortex(TM)-M Microcontrollers: 1
Embedded Systems: Real-Time Interfacing to Arm® Cortex(TM)-M Microcontrollers: 2
Embedded Systems: Real-Time Operating Systems for Arm Cortex M Microcontrollers: 3
by Jonathan W. Valvano

I belive the books use the Texas Instruments Tiva™ C Series LaunchPad (but it would be worth checking).
___________________________________________________________________
{1} https://www.sparkfun.com/
@tath
Thank you. I checked those out and they look pretty neat.

@Grey Wolf
Would those books still be relevant if I were to get what tath suggested? Or is the LaunchPad a better buy?
closed account (z05DSL3A)
Renthalkx97,

The books use examples aimed at the LaunchPad products, while the information is still relevant for other microcontrollers, translating to a different device might be an unnecessary complication. TI LaunchPads (TM4C123 and TM4C1294) are quite cheap.

Another thing you may want to look into is Arduino. There is plenty of info on the available and you can ease into embedded systems.

Anyway, my advise; match the hardware you use to the source of information you choose.
STM32 is pretty popular, there are many forums (official and unofficial).
Here is some nice PDF http://www.cs.indiana.edu/~geobrown/book.pdf .

In my opinion, if you truly want to understand hardware/programming you should implement your solutions before using already available ones (writing your own basic firmware to understand the target architecture).

If you want to pursuit embedded system i wouldn't recommend using atmega Arduino with libraries - it is intended for hobbyist due to it's rapid development nature.

So for Arduino you could choose ARM cortex-m3 version (http://arduino.cc/en/pmwiki.php?n=Main/ArduinoBoardDue) and build your framework from ground up. Good thing with arduino is that if you dont know how to soldier, it is easy to add external peripherals (motor drivers, lcd, gyroscope, etc.) with additional shields.
@tath

Thank you. Yes I truly want to understand how hardware and all the low level programming works. I feel like you can't truly grasp high level programming until you see how it works below the hood. Now to actually program these I'm assuming you'd be using C or something similar?
Arduino uses a language very very similar to C and C++ (if I remember correctly, it uses AVR-GCC, a derivate of GCC in poor words).
Been planning to get one for Christmas, they're pretty cheap but usually require more "shields" ("feature" cards, eg for microSD, LAN, LCDs, 230v relays...).
I should be able to get most of what I want for under 40 euros.
What's your budget? I may be following your path.
@EssGeEich

This is all for Christmas so I don't really have a budget but on Amazon I found the Arduno Due(what tath suggested) for $40. For $60 though it comes with a power supply and an UNO R3 Board(whatever that is). I ended up purchasing that.
It's either an Arduino Uno... or an Arduino Due.
Uno means One, Due means Two (in Italy, land of Arduino, where I was born and still live).
Uno R3 is the latest Uno revision (from 2012) which should be the most common around, and is THE arduino.
Arduino due is newer and offers new features (such as pure analog outputs instead of pwm) but is less common.
Last edited on
@Renthalkx97
I ended up purchasing that


you hurried with the purchase. This board has flash programmer but is missing JTAG emulator. What does it mean, is: currently you can download flash to target, but you you dont have possibility to preview target state: peek registers, put breakpoint - step through code.

You will end up printing traces through USART or blinking LED.
For now it might be enough, but you should thnk of buying JTAG emulator. Cheap one is segger J-link ( http://www.amazon.com/J-Link-JLink-JTAG-Emulator-Debugger-J-Link/dp/B00K8K24HY/ref=pd_sim_sbs_indust_2?ie=UTF8&refRID=1YAFW1Z9PZ903BBSAKMT) but you would probably also need pin adapter 20->10 (http://www.amazon.com/20Pin-14Pin-Pinboard-J-LINK-Adapter/dp/B00NQBI5ES/ref=pd_sim_sbs_pc_2?ie=UTF8&refRID=0RDT5XX898S5PC0N1S0S).

As you see, stm32 discovery would be easier to start playing with cm3 since it has build int JTAG emulator in device price ;).
Last edited on
Will the one I bought still work for learning about hardware and all that? If not I can still buy the stm32. I jus bought the arduino because it was the one you linked and I found it cheap on Amazon.
closed account (z05DSL3A)
Goto http://www.arduino.cc and have a look around.
Sure i will be good for now - bah, if you will get stm32 too, you can play with communication between both boards :).

Remember that board is required only for testing your code. Like most of the new things you will need to read your share of stuff.

this free e-book that i linked before is really nice: http://www.cs.indiana.edu/~geobrown/book.pdf .

* optionally *
If you dont have background in computer science or electronics its good to know a bit about digital logic (logic gates, multiplexers, flip flops, etc.) so you know what happens in such images: http://www.stm32.eu/sites/default/files/artykuly/Sygnaly_zegarowe_STM32F1_Connectivity_Line/rys2.jpg


Yes I'm going to get both. Knowing that a bit is turned on when there is electricity going to it is about the extent of my knowledge. I have another question, are these boards easilly customizable? Like say for example I wanted to put some servos and sensors on it? Soldering isn't an issue if that's what you need to do.
Consider using a Breadboard... This way you won't risk stain blobs over your device (at least while you're prototyping).
Note: You will only receive either a 0 or a 5v output (3.3 in some cases, check a manual) so to interact with high voltage stuff you need 5v relays... and even if you use your 5v output, use a transistor to use another power source: you shouldn't use a direct output for some stuff (eg. phone battery charger).
Topic archived. No new replies allowed.