What is a microcontroller?

A microcontroller is an integrated circuit (IC) characterized by having a CPU, memory, and I/O control
lines all on one chip. One popular microcontroller IC is shown in the image below.
There is a wide variety
of sizes, shapes, memory, speed, and uses of microcontrollers.

A microcontroller (ATMega 328PU from Atmel)

Microcontrollers are electronic switches. They differ from
ordinary household electrical switches in two ways:

How to control a microcontroller 😊

There are three steps to customizing a microcontroller for a particular project:

  1. Write a program using a workstation (laptop or desktop).

  2. “Compile” the program, turning it into the 1’s and 0’s that can be understood by the microcontroller.

  3. Download the program to the microcontroller, aka “flash” it, because your are
    writing your compiled program to its flash memory.

➡ Once programmed, a microcontroller will repeat the same set of commands forever. If it
is reset or temporarily loses power, it will start again and continue running the same
program. This will continue until it is reprogrammed.

Arduino makes it simple

A program called arduino and a set of circuit boards from a company named
“Arduino” greatly simplify the task of programming and communicating with
a microcontroller.

Connecting a computer to an Arduino board Closeup of the arduino GUI

Arduino’s aren’t for everybody

The arduino program only works for some microcontrollers (initially, only
microcontrollers manufactured by Atmel, but the list is growing all the time).

To program a microcontroller that is not built into the arduino program, users
typically rely on specialized tools from the chip manufacturer, and often need to
learn how the microcontroller works at a very basic level.

A note on word usage

The Arduino company has made the designs of all their boards available to the public
with an open source license. Many vendors now sell boards that can be used with the
arduino program. Depending on the context, the word “arduino” might mean:

Getting started

The easiest way to learn how to master Arduino’s is to control LEDs.
There is a small LED on-board (almost) every Arduino board, and this
provides a natural place to start. From there, move on to controlling
an external LED, then several LEDs, with more and more interesting
lighting patterns. Jump into the LEDs here.