I loved learning about the microcontroller basics when I was studying. It meant I could start taking advantage of microcontrollers in my electronics projects. It kind of felt like with this knowledge, I was unstoppable. I could build ANYTHING!
And it is actually true. Microcontrollers are powerful components. They let you write programs to control your electronics. Combine this knowledge with how to build your own circuit boards, and you’re gonna make amazing things.
By using a microcontroller in your project you will have access to a vast amount of functionality from the tips of your (programming) fingers.
Which microcontroller to use?
There are many types of microcontrollers available on the market. Some are easier to use than others.
There are 8-bit, 16-bit and 32-bit microcontrollers available. The simplest microcontrollers are 8-bit. They can do a lot, but they can’t handle operations that needs heavy calculations.
I am not going to list all of them here. But two 8-bit microcontroller families that are easy to use for hobbyists and beginners are AVR and PIC. These are great for learning the microcontroller basics.
AVR is by Atmel and is the microcontroller that I have used the most. It’s really popular among hobbyists. PIC is by Microchip. I have not used PIC, but people say it’s good. It’s also very popular among hobbyists.
There are several types of both PIC and AVR microcontrollers. What sets them apart is the amount of memory, the number of IO pins and the types of peripherals they have. Peripherals are function like Pulse-Width Modulation, Analog-to-Digital conversion, Serial Peripheral Interface, I2C, etc..
If you only want a simple microcontroller to control pins on/off, you don’t have to worry about all the peripherals. Just find one that has enough IO pins and that you are comfortable programming.
For example check out ATtiny2313 for a simple and cheap microcontroller for getting started.
Microcontroller Basics: Using them in projects
There are two ways of using microcontrollers in a project:
- Use a microcontroller board
- Integrate a microcontroller on your circuit board
This simplest way to get started is to use a microcontroller board.
But it will be both cheaper, more compact and less messy if you integrate a microcontroller to your own board.
Using Microcontroller Boards
The most famous microcontroller board is Arduino. It’s a hardware and software suite designed to make it easy to get started with programming microcontrollers. Learn about Arduino programming.
But you can also find other microcontroller boards. They usually have just the microcontroller chip and the necessary components to make it work. This is a great way to test a microcontroller that you haven’t used before.
To get started and learn the microcontroller basics, I would definitely recommend getting an Arduino board. This is the absolute simplest way of getting started. By one together with some basic components, and start experimenting.
Click here to get the Arduino Starter Kit
Using Microcontroller Chips
A microcontroller always has a datasheet where it’s functionality is described. In the datasheet, you will almost always find a reference schematic design for the microcontroller.
This makes it pretty easy to get a microcontroller board up and running.
I have also written a tutorial that teaches you how to build your own microcontroller circuit from scratch. Check out the microcontroller tutorial here.
(Remember to make sure you have a way of programming your microcontroller. This is not always added in the reference diagram)
To expand on the microcontroller basics, learn microcontroller programming to learn how to program a microcontroller.
Andreas Jonsson
2017/4/24 9:35:38
Excellent work. I am impressed.