In addition to covering digital and analog inputs in this
article, we’ve also spent some time getting comfortable
using registers. Microcontroller programming is all about
registers, so it’s good to get comfortable with them!
From here on in, we can get into more “juicy” topics
now that the basics are covered. Next month, we’ll dive
into serial communications, so that we can get our
microcontroller projects talking to our PC. You’ll know
from your Arduino days that serial comms are a very
useful way to both interact with and debug your projects.
We’ve had some great feedback. Please keep your
comments and suggestions coming and, of course, share
any projects you create based on what we’ve covered so
far. Let’s not restrict communication to that of the “serial”
variety! I look forward to connecting again next time. NV
44 May 2015
Figure 8: Guessing Game project schematic.
Figure 9: Guessing Game project laid out
on the breadboard.
The Arduino IDE
We discussed a few IDE options in the previous article, but I
wanted to elaborate on Atmel Studio vs. the Arduino IDE.
In this series, I use the term “Arduino IDE” to refer to the
combination of the development environment and the built-in
commands and libraries that are an integral part of it. In other words,
the entire package that you download and install. I am assuming that
you're using the environment as it was intended — relying on the
built-in functions to make your life easier.
You can, if you choose, ignore the built-in functions in the
Arduino IDE and work directly with the registers that we use in this
series from within the IDE. For example, you are able to use the Data
Direction and Input registers. I don't recommend this though, and
suggest rather that you move to a more fully-featured IDE. The
Arduino IDE is the best of its kind for achieving what it sets out to
achieve, but once you discard the built-in functions that are core to
what it is, I personally don’t feel that it is the best environment to