Home›Topics›What is Firmware?
BEGINNER FRIENDLY · EMBEDDED SYSTEMS

What is Firmware?
Explained from Scratch

By EcrioniX · 25 Sep 2026 · ~18 min read

You have heard “firmware update” on a TV, a router, or a game controller. This page starts from zero. No coding class required. If you can follow a recipe, you can follow firmware.

0. Three words first

Before the diagrams, lock in three words. Everything else on this page is just these three ideas wearing different clothes.

Hardware

The thing you can touch. A light bulb, a motor, a button, a plastic box, a tiny chip. Hardware by itself does not know a plan. A bulb can glow. It does not know when to glow.

Software

An app you install and delete. A game on a phone. A browser on a laptop. Software needs a bigger computer that is already awake — Windows, Android, or iOS.

Firmware

A small recipe stored inside the gadget. It tells the hardware what to do. It stays even when the power is off. No app store. No Windows. Just steps the chip follows.

One sentence you can remember

Hardware is the body. Firmware is the habit written into that body. Software is an extra job you give a computer that is already awake.

0.5 A washing machine, told like a story

Your school uniform is muddy. You put it in a washing machine and press Start. You do not stand there saying “now spin, now add water.” The machine already knows the steps:

  1. Lock the door.
  2. Fill with water.
  3. Add a little soap time.
  4. Spin slowly.
  5. Drain.
  6. Spin fast.
  7. Beep. Done.

Those steps are not the metal drum. They are not the water. They are a list of orders saved inside a small chip in the machine. That list is firmware.

Same idea, smaller object

A toy car with a remote: the plastic car is hardware. The tiny program that says “if the forward button is pressed, spin the motor” is firmware. The racing game on your phone is software — it is not glued inside the toy.

1. The Problem: Hardware Without a Brain

Imagine you are asked to build a traffic light for a small school crossing. The light needs to do this:

Attempt 1: Pure Hardware (No Brain)

Your first idea: "I will just wire it up with timers and relays!"

220V Power Timer #1 30 sec Timer #2 5 sec Timer #3 30 sec Relay A Relay B Relay C R Y G ⚠ Problems 3 separate timers 3 relays Lots of wiring Change timing? Rewire everything! Add a sensor?
A hardwired traffic light: 3 timers, 3 relays, mountains of wiring. Change anything = rebuild from scratch.

❌ Why This Fails in Real Life

The hardware is frozen. Once you wire it, it can never learn new tricks.

2. The Solution: Give Hardware a Brain

🧠 The Key Analogy

Think of a robot toy. If you glue its arms in one position, it can only do one thing forever. But if you put a tiny computer inside and write instructions — "raise left arm, wait 2 seconds, lower it" — now you can change the instructions anytime without rebuilding the robot.

Those instructions stored inside the chip = Firmware.

Instead of 3 timers and 3 relays, we replace everything with one tiny chip called a microcontroller (like Arduino, STM32, ESP32). This chip has:

5V Power Microcontroller (One tiny chip) CPU Flash Mem GPIO Pins R Y G Pin 1 Pin 2 Pin 3 ✅ Benefits Just 1 chip Only 3 wires to LEDs Change timing? Just edit the code! Add sensor? Add 1 line of code!
The firmware approach: one chip replaces all the timers and relays. Changes require editing code, not rewiring.

3. Writing the Firmware (Step by Step)

Here is the recipe inside the traffic-light chip. Read it like English. You do not need to memorize the words.

// ═══════════════════════════════════════════
// FIRMWARE: Smart Traffic Light Controller
// Stored inside the chip's Flash memory
// ═══════════════════════════════════════════

// Step 1: Name the 3 GPIO pins
int RED_PIN   = 1;
int YELLOW_PIN = 2;
int GREEN_PIN  = 3;

// Step 2: When the chip powers on, do this ONCE
void setup() {
    // Tell the chip: these 3 pins will OUTPUT electricity
    pinMode(RED_PIN,    OUTPUT);
    pinMode(YELLOW_PIN, OUTPUT);
    pinMode(GREEN_PIN,  OUTPUT);
}

// Step 3: After setup, do this FOREVER (loop)
void loop() {

    // ── GREEN PHASE ──
    digitalWrite(GREEN_PIN, HIGH);   // Turn ON green
    delay(30000);                    // Wait 30 seconds
    digitalWrite(GREEN_PIN, LOW);    // Turn OFF green

    // ── YELLOW PHASE ──
    digitalWrite(YELLOW_PIN, HIGH);  // Turn ON yellow
    delay(5000);                     // Wait 5 seconds
    digitalWrite(YELLOW_PIN, LOW);   // Turn OFF yellow

    // ── RED PHASE ──
    digitalWrite(RED_PIN, HIGH);     // Turn ON red
    delay(30000);                    // Wait 30 seconds
    digitalWrite(RED_PIN, LOW);      // Turn OFF red

    // Loop back to GREEN automatically!
}

✅ Now See Why Firmware is Powerful

You never touch the wires. You only change the instructions.

3.5 How the recipe gets into the chip

You do not open the chip with a screwdriver and drop letters inside. There are four simple steps. Think of translating a story into a secret code the chip can obey.

  1. You write the recipe in a human-friendly language (often C, or Arduino’s simple C++). That is the traffic-light program above.
  2. A compiler translates it into machine code: a long list of 0s and 1s. The chip cannot read English. It can only follow tiny electrical patterns.
  3. A cable sends that list into the chip. On a school board this is a USB cable. In a factory it is a programmer jig that touches the chip before it is sealed in plastic.
  4. The chip stores the list in flash memory. Unplug the cable. Turn the power off. The recipe is still there tomorrow.

Notebook vs chalkboard

Flash memory is a notebook: close the book, the writing stays. RAM is a chalkboard: wipe it (or cut the power) and the writing is gone. Firmware belongs in the notebook, not on the chalkboard.

3.6 What happens the moment you press power

Nothing magical. The chip wakes up and does the same four jobs every time:

  1. Power arrives. The chip comes out of sleep. Its first job is not “be a traffic light.” Its first job is “start at instruction number 1.”
  2. It reads one instruction from flash. Example: “make pin 3 an output.”
  3. It does that instruction. Electricity on pin 3 is now allowed to drive the green lamp.
  4. It moves to the next instruction and repeats. Green on. Wait. Green off. Yellow on. Wait. Forever, until power is removed.

That loop — read, do, next — is the whole life of firmware. A phone, a keyboard, and a washing machine are the same idea with longer recipes.

3.7 Three kinds of memory (school version)

NameSchool pictureDoes it forget when power is off?Used for
ROMWords carved in stoneNoVery old chips. The recipe could not be changed.
FlashA notebook you can erase and rewriteNoAlmost all modern firmware. This is why “firmware update” exists.
RAMA chalkboardYesScratch work while the chip is running: a counter, a sensor reading. Not the permanent recipe.

So when someone says “the firmware is stored in flash,” they mean: the recipe sits in memory that remembers, and we can replace the recipe later if we find a bug.

4. Watch the Firmware Execute (Visual Simulation)

Below is a visual timeline showing exactly what happens inside the chip, clock cycle by clock cycle. The firmware reads each instruction from Flash memory and drives the GPIO pins accordingly:

Time → 0s 30s 35s 65s 95s 100s GREEN GREEN YELLOW RED ON (30s) ON again! ON (5s) ON (30s) ← One full cycle (65 seconds) — then it repeats! →
The firmware's output on GPIO pins over time. Green → Yellow → Red → repeat. This is exactly what the chip is doing.

5. Before vs After: Hardwired vs Firmware

❌ Without Firmware

  • 3 separate timer chips
  • 3 relay modules
  • Dozens of wires
  • Change timing = rewire
  • Add feature = redesign
  • Cost: ~$50 in parts
VS

✅ With Firmware

  • 1 microcontroller chip ($2)
  • 0 relays needed
  • Only 3 wires to LEDs
  • Change timing = edit 1 number
  • Add feature = add 1 line
  • Cost: ~$5 total

6. Firmware is EVERYWHERE Around You

Now that you understand the concept, you will start seeing firmware everywhere:

🖨️ Your Printer — Firmware tells the print head where to move, how much ink to spray, and when to feed the next page.

📺 Your Smart TV — Firmware boots the TV, initializes the display panel, connects to Wi-Fi, and launches the operating system.

🚗 Your Car — Modern cars have 50-100 microcontrollers, each running its own firmware: engine control, ABS brakes, airbag deployment, infotainment.

⌨️ Your Keyboard — Yes, even your keyboard has firmware! It detects which key you pressed and sends the correct signal to your computer.

📱 Your Phone (Bootloader) — When you press the power button, firmware is the first code that runs — before Android or iOS even loads.

6.5 What firmware is not

If the recipe is wrong

A bug in firmware is a wrong step in the recipe. A washing machine might never stop spinning. A router might forget how to connect. A bad update can “brick” a device — the body is fine, but the first instructions are so broken the chip cannot start. That is why updates ask you not to unplug power halfway through.

7. Firmware vs Software: What is the Difference?

⚡ HARDWARE (Silicon, Wires, Transistors) 🧠 FIRMWARE (Instructions baked into the chip) 💻 SOFTWARE (Apps you install & delete) Easy to change Harder to change Cannot change Chrome, WhatsApp, Games Bootloader, Drivers, BIOS CPU, RAM, GPU, Screen
The 3-layer stack: Hardware at the bottom (frozen in silicon), Firmware in the middle (baked in, but updatable), Software on top (easily installed/deleted).

🔑 The Simple Rule

Software tells the operating system what to do. Firmware tells the hardware what to do. Without firmware, the hardware is a lifeless brick. Without software, the hardware can still function (it just does one thing, defined by its firmware).

8. Frequently Asked Questions

Q: Can firmware be updated after the chip is manufactured?

Yes! Modern chips use Flash memory, which can be erased and rewritten electrically. This is how your router, TV, or car gets "firmware updates" — new instructions are written to the chip's memory without physically replacing it. Older chips used ROM (Read-Only Memory), which truly could not be changed.

Q: What language is firmware written in?

Most firmware is written in C or C++ because these languages give you direct control over the chip's memory and pins. Some very low-level firmware (bootloaders) is written in Assembly language. Arduino uses a simplified version of C++.

Q: Is BIOS firmware?

Yes! Your computer's BIOS (or UEFI) is firmware. When you press the power button, the BIOS is the first code that runs. It checks the RAM, detects the hard drive, initializes the screen, and then loads the operating system (Windows/Linux). Without BIOS firmware, pressing the power button would do absolutely nothing.

Q: How big is a typical firmware?

Very small compared to software! A traffic light firmware might be 2 KB (about a short page of text). A car's engine controller firmware might be 1–4 MB. A big phone app can be hundreds of megabytes because it carries pictures, videos, and an operating system around it. Firmware is small because it talks straight to pins and motors.

Q: Does a school calculator have firmware?

Yes. Press 2 + 2 =. The plastic keys are hardware. The steps “read the keys, add the numbers, light up these segments on the screen” are firmware stored in the calculator’s chip. There is no app to install.

Q: Who writes firmware?

An embedded engineer (sometimes called a firmware engineer). They write the recipe in C or C++, test it on a real board, then load it into flash. The same person often checks what happens if power cuts off in the middle of a step.

Q: Is a video-game cartridge firmware?

Close. The game data on an old cartridge is software stored in a chip. The tiny program inside the console that knows how to read that cartridge and drive the screen is firmware. Same family of idea: instructions living in a chip, not on a hard disk you can drag to the trash.