What a Microcontroller Actually Is
A processor, its memory and a pile of peripherals sold as a part you solder down. Everything it can do reaches the outside world through pins — so that is where this explanation starts.
The package, pin by pin
Fig. 1Twenty-four pins, seven classes. Click any pin and the panel resolves to what that class of pin is for, what it needs from your board, and how many of them sit on a part like this one.
Supply
VDD / VCC
Every supply pin expects its own decoupling capacitor as close as the layout allows, because the pin is the end of a wire and every wire has inductance.
- One capacitor per pin, not one per board
- Bulk capacitance is a separate job
- Analogue supplies often want their own filter
Return
VSS / GND
On paper one symbol repeated forty times; on the board a network with geometry and impedance. Return current takes the easiest route home, not the one you drew.
- Keep return paths short and under their signal
- Separate analogue and digital returns where the part asks for it
- Most drifting analogue readings are a ground problem
Reset
NRST
While reset is asserted the core executes nothing. How it is released, and how cleanly, decides whether the part starts at all.
- Needs a defined level, not a floating pin
- Watch the release slope
- A brown-out detector is not optional in the field
Boot strapping
BOOTn
Sampled once, at release of reset, to decide where the part starts executing. After that the same pin is usually something else entirely.
- Read once, then repurposed
- A pull resistor is cheaper than a mystery
- Explains most ‘it works on my board’ failures
Debug and program
SWD / JTAG
The pins a programmer or debugger uses. Bring them to a header even on a board you think is final.
- Two pins for SWD, four or five for JTAG
- Keep them off anything that fights the debugger
- A board with no debug header is a board you cannot rescue
General purpose
Px.y
Everything else. Each is multiplexed onto several peripherals, and choosing which function lives where is a real design decision.
- Check drive strength, not just voltage
- Not every pin is 5 V tolerant
- Peripheral conflicts are decided at pin-assignment time
Analogue
ADC / VREF
Inputs that measure rather than switch, plus the reference they measure against. The reference is as important as the input.
- A noisy reference is a noisy reading
- Source impedance matters to the sampler
- Keep switching currents away from these
Fig. 1 — A generic package. These are pin classes, not a pinout. Work from the manufacturer’s documentation for any real part.
The Memory Types, Told Apart
Table 1Five kinds of non-volatile memory that get used interchangeably in conversation and behave nothing alike. How a cell is written, and how much you must erase to change it, explains almost every other difference here.
| Type | Keeps state unpowered | How it’s written | Smallest erase | Wear | What it’s for |
|---|---|---|---|---|---|
| Mask ROM | Yes | At manufacture, in the mask | Not erasable | None | Code that will never change, at volume. |
| EEPROM | Yes | Byte at a time, in circuit | One byte | ~100k–1M cycles | Small settings that change often. |
| NOR flash | Yes | Word at a time | A whole sector | ~10k–100k cycles | Program code you execute in place. |
| NAND flash | Yes | A page at a time | A whole block | ~1k–100k cycles | Bulk storage, with a controller managing wear. |
| FRAM | Yes | Byte at a time, fast | Not required | ~10^12+ cycles | Logging, and anything written constantly. |
For contrast: SRAM and DRAM are volatile. They hold your variables while the part is powered and forget everything the moment it is not. The full explainer →
Four Ways Firmware Gets In
Table 2ISP, JTAG, SWD and a resident bootloader. The choice is usually made months before anyone flashes anything — on the schematic, when the pins are assigned.
| Interface | Wires | What it does | Reach for it when |
|---|---|---|---|
| ISP | 3–4 + power | Programs the part in circuit through a peripheral it already has. | Production programming on a board with no debug need. |
| JTAG | 4–5 | Programs and debugs, and can chain several devices on one port. | Boards with several programmable parts, or boundary-scan test. |
| SWD | 2 + power | Programs and debugs over two wires — the usual choice on ARM parts. | Almost always, on anything Cortex-M, if you have the pins. |
| Bootloader | 2 (a serial port) or none | The part programs itself from code already resident in it. | Field updates, or where no programmer will ever be attached. |
Wire counts are the usual case, not a specification. When you would use each →
Firmware’s Journey
Walkthrough · 7 stagesFrom a text file to an instruction executing out of flash. Each stage produces something specific — and each has its own way of going wrong.
- 01
Source
Your .c and .h files, plus the vendor’s headers and startup code.
- 02
Compile
One object file per source file, with addresses still unresolved.
- 03
Link
A single image, symbols resolved, laid out by the linker script.
- 04
Locate
Sections placed at real addresses — code in flash, variables in RAM, constants where you said.
- 05
Convert
A hex or binary file: the bytes, and where each byte goes.
- 06
Flash
Those bytes written into non-volatile memory and verified.
- 07
Reset
The core released, the vector table read, and your first instruction executed.
Every stage in full, with what each one actually produces: From Source to Running Code →
On the bench
Newest first
The Pins You Have to Get Right First
Power, ground, reset and boot-strapping. Get these wrong and nothing else you measure means anything.
By The Bench · 6 min readRead →
The Memory Types, Told Apart
Five kinds of non-volatile memory that behave nothing alike.
By The Bench · 4 min readRead →
Four Ways Firmware Gets In
ISP, JTAG, SWD and a bootloader — when you would use each.
By The Bench · 8 min readRead →- 03Debugging Something With No ScreenBreakpoints, watch windows, a spare pin and a logic analyser.
- 05How a Chip Is Actually MadeWafer, lithography, test, package — the industrial chain in one page.
- 01What a Microcontroller Actually IsA processor, its memory and a pile of peripherals sold as a part you solder down.
- 02From Source to Running CodeCompile, link, locate, flash, reset — what each stage actually produces.
- 03What a Device Programmer DoesSockets, in-circuit adapters and the difference between programming and debugging.
- 04Making It Last on a BatterySleep modes, duty cycles and where the current actually goes.
- 04Interrupts, and Why Timing Gets StrangeThe mental model that makes embedded code stop surprising you.
- 02What a Bootloader Buys YouField updates without a programmer, and the risks that come with it.
- 01Clocks, and Why the Part Will Not StartOscillators, startup time and the most common reason a new board is dead.
- 04Reading the Real WorldAnalogue inputs, noise, and why your reading drifts when a motor turns.
- 02Why Read-Out Protection ExistsWhat the feature is for, and why it is a business decision as much as a technical one.
- 05Why the Package MattersDIP to QFN to BGA: what changes for the person soldering it.
- 03The Bench, Minimally EquippedWhat is worth buying first, and what can wait.
Also on the bench
Kept lit byMakers and communities whose work shares space on this workbench.
VIXEN knows what we know: the best performances start with careful setup and a slow, deliberate burn.vixamour.com
Noir Male is premium black-label production where every signal is clean and uncompromised.noirgays.com
Monsters of Cock explores extreme form-factor specs that push every slot to its limit.cockmonsta.com
Mom Is Horny reminds you that experienced hardware always knows how to demand full power.mommahorny.com
Sweetheart Video demonstrates that the gentlest handshake protocols make the best connections.heartvids.com
Public Agent takes the lab work out in the field where real conditions test everything.1publicagent.com



