For many people coding on the Arduino, and all of it’s variants (Mega, Zero, Micro, etc), is enough for their needs. For others, it’s a great stepping stone but is extremely limiting and is to high level. If you’re in school for electrical/computer engineering then, to me, you have to move past the Arduino environment but there’s nothing wrong with starting there. If you’re a hobbyist who wants to learn more, then it can be hard to find a guide that really goes over the things you should know.
I find that a lot of guides focus on either going from the Arduino Uno/Mega to the Zero or some other type of faster version of it. Even if you move to a new board entirely, their tutorials will focus on their own libraries. That takes away some of the magic of really learning how the microcontroller (MCU) works. Sure, it might be more work but you really learn what’s going on and when things work, it feels that much more satisfying. Not to mention these libraries are usually built in a way that supports hundreds of boards and dozen of families of chips. It can be overkill.
I plan to go over various boards you can use, what typical hardware is in them, what IDE’s there are, how to get started with them, coding techniques, different things I wish I knew out the gate and more. If you’re wondering what IDE means (integrated development environment) it’s just a coding environment you use to compile and program your MCU. You already have experience with the Arduino IDE seen below.
If you’re thinking of learning more about MCU’s but you’re not sure what the advantages are of using a different IDE than the Aruidno one is, then I’ll name a few:
- Better debugging tools. You can access memory and do things step by step in a way that makes finding problems so much easier. Although it can a little confusing at first.
- You learn to work with raw C code and not just the Arduino version of it. Not to say Arduino coding isn’t C-like (the libraries are actually C/C++), quite the opposite but it does simplify things in a way that isn’t done in standard MCU programming.
- You can access the assembly code easily and even write some if you need to. If you’re unsure what “assembly” is then don’t worry, I’ll go over that in the next part. Or if you do know what it is and fear you’ll have to learn assembly don’t worry, it’s a good thing to know but isn’t something you need to be great at. Just understanding the basics is enough.
- Better control of the MCU, which can lead to faster programs and less overhead. Because so much of the back-end code is hidden from you by Arduino, it’s hard to find out why your code is running slow. Is it the library you’re using, the general way the IDE converts what you’ve written or some other unknown reason?
Of course there are other ways of coding that don’t use any IDE and just a basic text editor/command lines, but for now the focus will be using the chip designer’s IDE.
This first post is going to go over the different MCU vendors, their IDE’s and the boards you can use. This is by no means a “these are the best boards to use” list. I’m only going by what I’ve used but there are plenty of other options out there and I suggest you find ones that best fit your needs. This is just to show you what’s out there.
I’m also not going through every board I’ve used by each manufacturer either, mostly for the sake of keeping this relatively short. I’ve used probably 7 Texas Instrument (TI) dev boards alone over the last few years but only mention two. If you have an exact application you’re looking for, I suggest you look at their websites (TI, Atmel, Microchip, ST, etc) and do a little research.
Finally, I’ll be focusing on 8-bit processors because it’s a good, easy transition from Arduino (which is also 8-bit) to the standard 8-bit MCU’s out there. They’re typically simpler to use than 32-bit ARM processors that I will be going over at some point in the near future.
ATmega328PB Xplained Mini (link)
This is probably the most natural progression from the Arduino just because this is the same family of chips that’s used on the Arduino. The 8bit-AVR architecture is easy to use and the datasheets that Atmel makes are top notch. Relatively easy to read and goes in depth.
The IDE is based off of visual studio (VS) which is either a plus or a negative for you depending on your history with VS. For me it was a negative because VS has always been slow for me for both normal use and special cases (I’m looking at you Unreal Engine 4…). It’s gotten better over the years but it’s still not great. Thankfully Atmel did a great job and it doesn’t feel slow or hindered at all and overall is a pretty good IDE.
I’ll be using this board in the next parts of this series since I like the AVR architecture and it’s a really cheap board (~$10).
Curiosity Development Board (link)
This is a great development board for a few reasons. Easily swap-able chip so you can program it, remove it and tack it onto any board you make. A ton of options for peripherals and it’s pretty cheap (~$20). This is a Microchip made board for their PIC architecture and, having used a lot of different IDE’s, I have to say there’s is by far the most beginner friendly.
To give some context here’s Microchip’s IDE:
And here’s Atmel’s:
You’ll notice there are a lot more buttons up top and at first glance you’re not sure what to do… it can be a little intimidating. But looking at Microchip’s, it seems simply and clean, just like the Arduino IDE. This reason alone is why I recommend it to people who look at the Atmel IDE (or the TI IDE) and go “What the hell is that”?
But to be clear, using any of these is actually pretty easy. There might be a lot more buttons but there’s really 3-5 that really matter (in the beginning) and that’s all you need to get started.
MSP-EXP430G2 LaunchPad (link)
I’ll be honest I have a soft spot for TI dev boards because it was an early MCU that I really got into. Their launchpad series is fantastic with so many different options for things Wi-Fi, Bluetooth, high-performance (DSP), etc. Plus their all pretty cheap! Most can be bought for <$30 and this one I mention here is just $10. This one also has the ability to swap chips which is always a plus, but if that isn’t a big deal for you I might also recommend the MSP-EXP430FR5994 LaunchPad which comes with an SD card slot and more pinouts.
Their IDE is eclipse based and is pretty good. I’d say it’s about the same between the Atmel and the TI IDE each on has their own pluses and minuses, but you can’t go wrong with either one.
This is by far the one I have the least experience with. I probably wouldn’t have put it on here but given how cheap it is (~$8), and the good things I’ve heard about it I figured I’d at the very least mention it. I’ll leave it to you to see if it’s something you want to discover on your own…. no pun intended.
That’s it for now. Hopefully you found this helpful. I’m still trying to figure out what the next part of this tutorial will be. I think I’ll just jump right into a programming example to show how simple it is to get started and then go over the common hardware of development boards, C coding techniques and what the hell assembly coding is and why you should care.
If you have any feedback on this post, futures ones or requests please let me know.
Thanks for reading and I’ll see you next time.