Electronics Bash – #17- Control Registers

The code we write for an Arduino is ultimately meant to get certain bits and bytes into the microprocessor so that it does what we want. This week, we’ll continue to peek behind the curtain and see how standard Arduino code represents modifications to various places in the microprocessor’s memory, and how we can directly access those places to gain faster, tighter, more precise control of the Arduino.

Topics Include:

  • The Three Types of Memory
  • What is a register?
  • Register Access
  • Bitwise Math
  • Introduction to Timers?


The following code will make use of the above circuit diagram

LED Button

LED Button Registers

LED Button Registers with with Bitshifting

LED Button Registers with with Bitshifting

Pin Change Interrupts