The first question to ponder is what, exactly, is a microcontroller? Clearly it’s a chunk of silicon, but what’s inside of it?
Rhetorical questions aside, it’s well worth getting the big-picture overview before we dive headfirst into flipping bits, flashing program memory, and beyond.
Microcontrollers are often defined as being complete computers on a single chip, and this is certainly true.
At their core, microcontrollers have a processor that is similar to the CPU on your computer. The processor reads instructions from a memory space (in flash memory rather than on a hard drive), sends math off to an arithmetic logic unit (instead of a math coprocessor), and ...