Home / Chip Level Programming
Chip Level Programming: free complete tutorial with simulators
Learn how chips work and how to program them, step by step in simple English: from transistors and logic gates to CPUs, assembly, embedded C, microcontrollers and FPGA. Every lesson explains what, why, how and where, with a diagram and a live simulator you can edit. 226 lessons and 247 live examples.
How to learn:Go in order from the top. Read the theory, edit the example and break it on purpose, then do the quiz. The simulators run inside your browser, so no board or software is needed to start.
Start here
What Is Chip Level Programming? The Complete Roadmap1 live examplesFrom Sand to Software: How a Chip Is Built in Layers1 live examplesHistory of Chips: Vacuum Tube to 3 nm1 live examplesYour Lab: Boards, Tools and Free Simulators1 live examplesChoosing a Chip: AVR, STM32, ESP32, RP2040, FPGA1 live examplesHow to Learn: Design First, Then Code1 live examples
Electronics foundations
Voltage, Current and Resistance1 live examplesOhm's Law and Power1 live examplesResistors: Series, Parallel and Voltage Dividers1 live examplesCapacitors: Decoupling, Filters and Timing1 live examplesInductors, Coils and Back-EMF1 live examplesDiodes, LEDs and Zener Diodes1 live examplesBipolar Transistors (BJT) as Switches1 live examplesMOSFETs: Switching Loads from a Pin1 live examplesOp-Amps: Amplifiers and Comparators1 live examplesPower Supplies: Linear and Switching Regulators1 live examplesBatteries and Charging1 live examplesBreadboard, Multimeter and Measuring1 live examplesReading Schematics and Datasheets1 live examplesPCB Basics: Layout, Layers and Grounding1 live examplesSoldering, ESD and Safety1 live examples
Digital electronics
Number Systems: Binary, Octal, Decimal and Hexadecimal1 live examplesBinary Arithmetic, Signed Numbers and Overflow2 live examplesBCD, Gray Code and ASCII1 live examplesParity, Checksums and CRC1 live examplesLogic Gates: AND, OR, NOT, NAND, NOR, XOR2 live examplesBoolean Algebra and Simplifying Logic1 live examplesKarnaugh Maps Step by Step1 live examplesCombinational Circuits: Adders, Multiplexers and Decoders2 live examplesComparators and the ALU1 live examplesSequential Circuits: Latches, Flip-Flops, Counters and Clocks2 live examplesShift Registers and LFSR1 live examplesFinite State Machines (FSM)1 live examplesTiming Diagrams, Setup and Hold1 live examplesLogic Families, Voltage Levels and Level Shifting1 live examplesPLA, PAL, CPLD and FPGA Overview1 live examples
Memory and the CPU
Memory: Registers, SRAM, DRAM, Flash and EEPROM1 live examplesCache Memory and Locality1 live examplesCPU Architecture: ALU, Registers, Control Unit and Buses1 live examplesThe Fetch, Decode, Execute Cycle (Build a CPU Simulator)1 live examplesInstruction Sets: RISC, CISC, ARM, AVR, x86 and RISC-V1 live examplesAddressing Modes in Depth1 live examplesPipelines and Hazards1 live examplesAssembly Language Basics1 live examplesThe Stack, Function Calls and Memory Layout1 live examplesInterrupts, Exceptions and the Vector Table1 live examplesFloating Point and Fixed Point Numbers2 live examplesDMA: Moving Data Without the CPU1 live examplesBuses, Address Decoding and Chip Selects1 live examplesMMU, MPU and Memory Protection1 live examplesHardwired vs Microcoded Control Units1 live examples
Embedded C
Bit Manipulation in C: Set, Clear, Toggle and Test2 live examplesC Data Types for Embedded: stdint, sizes, signedness1 live examplesPointers and Memory-Mapped Hardware1 live examplesvolatile, const, static and restrict1 live examplesStructs, Unions, Bitfields and Alignment1 live examplesMemory Sections and the Linker Script1 live examplesStartup Code and the Reset Handler1 live examplesCompiler, Assembler, Linker and Makefile1 live examplesInline Assembly and Intrinsics1 live examplesState Machines in C: switch, table, events1 live examplesCircular (Ring) Buffers1 live examplesFast Integer Maths: scaling, lookup tables, no divide1 live examplesprintf on a Microcontroller: Retargeting and Size1 live examplesCoding Standards: MISRA C, Naming and Safe Style1 live examplesTop C Mistakes in Firmware (and How to Avoid Them)1 live examplesGit and Version Control for Firmware1 live examples
Peripherals
Memory Mapped Registers and GPIO (Blink an LED)1 live examplesButtons, Pull-ups and Debouncing1 live examplesTimers, Counters and PWM2 live examplesInput Capture: Measuring Frequency and Pulse Width1 live examplesADC and DAC: Reading Sensors and Making Analog Voltages2 live examplesUART Serial Communication2 live examplesI2C Protocol in Depth1 live examplesSPI Protocol and Modes1 live examplesCAN Bus: Cars and Industrial Networks1 live examplesUSB Basics: Descriptors, Endpoints, Classes1 live examplesRTC and Watchdog Timers1 live examples7-Segment Displays and Multiplexing1 live examplesCharacter LCD, OLED and TFT Displays1 live examplesMatrix Keypad Scanning1 live examplesMotors, H-Bridges, Servos and Steppers1 live examplesSensor Guide: Which Sensor, Which Interface1 live examplesEEPROM, Flash and Saving Settings1 live examplesSD Cards, SPI Mode and FAT File System1 live examplesWireless Overview: Wi-Fi, BLE, LoRa, Zigbee, NFC1 live examples1-Wire, IR Remote and Other Simple Protocols1 live examples
AVR and Arduino
AVR Architecture: ATmega328P Inside the Arduino Uno1 live examplesArduino Functions vs Register Programming1 live examplesAVR GPIO Lab: LED Patterns and Buttons1 live examplesAVR Timers: CTC, PWM and millis1 live examplesAVR Interrupts: INT0, Pin Change and ISR Rules1 live examplesAVR ADC and UART at Register Level1 live examplesAVR I2C (TWI) and SPI at Register Level1 live examplesAVR Sleep Modes and Low Power1 live examplesAVR Fuses, Bootloader and Programming (ISP)1 live examplesATtiny85: Tiny Chip, Big Ideas1 live examples
STM32 and ARM Cortex-M
ARM Cortex-M Architecture: M0 to M71 live examplesSTM32 Family Guide: Which Chip for Which Job1 live examplesSTM32 Clock Tree: HSI, HSE, PLL and Buses1 live examplesSTM32 GPIO: Modes, Speeds and Alternate Functions1 live examplesExternal Interrupts (EXTI) and NVIC1 live examplesSTM32 Timers: Time Base, PWM, Encoder, One Pulse1 live examplesSTM32 ADC with DMA: Continuous Sampling1 live examplesSTM32 UART: Polling, Interrupt and DMA1 live examplesSTM32 I2C and SPI: Peripherals, Pitfalls, DMA1 live examplesSTM32 USB: CDC Virtual COM and HID1 live examplesSTM32 CAN: Filters, Mailboxes and Bit Timing1 live examplesSTM32 Low Power: Sleep, Stop, Standby1 live examplesHAL, LL and Registers: Choosing the Level1 live examplesSTM32CubeIDE and CubeMX Workflow1 live examplesSTM32 System Bootloader, DFU and Option Bytes1 live examplesHard Faults: Find the Crashing Instruction1 live examples
ESP32 and Wi-Fi
ESP32 Architecture and Variants1 live examplesESP-IDF and Arduino-ESP32 Workflow1 live examplesESP32 GPIO, PWM (LEDC), ADC and Touch1 live examplesESP32 Wi-Fi: Station, AP and Provisioning1 live examplesHTTP Server, REST Client and MQTT on ESP321 live examplesESP32 Bluetooth Low Energy: GATT and Advertising1 live examplesFreeRTOS on ESP32: Tasks, Cores and Queues1 live examplesOTA Updates: Safe Remote Firmware Update1 live examplesESP32 Deep Sleep and Wake Sources1 live examplesESP32 Security: Secure Boot, Flash Encryption, TLS1 live examples
RP2040 and RISC-V
RP2040 and Raspberry Pi Pico1 live examplesRP2040 PIO: Write Your Own Hardware Protocol1 live examplesRISC-V: Open Instruction Set Architecture1 live examplesRISC-V Assembly Programming1 live examplesRISC-V Privilege Levels, CSRs and Traps1 live examplesRISC-V Microcontrollers: ESP32-C3, CH32V, GD32V1 live examples
Embedded Linux
Embedded Linux: When a Microcontroller Is Not Enough1 live examplesEmbedded Linux Boot: ROM, SPL, U-Boot, Kernel, Init1 live examplesDevice Tree: Describing Hardware to the Kernel1 live examplesLinux Kernel Modules and Character Drivers1 live examplesLinux GPIO, I2C and SPI from User Space1 live examplesBuildroot and Yocto: Building Your Own Linux Image1 live examples
RTOS and Firmware Engineering
What Is an RTOS and When Do You Need One1 live examplesRTOS Tasks, Scheduling and Context Switches1 live examplesSemaphores, Mutexes and Priority Inversion1 live examplesQueues, Event Groups and Task Notifications1 live examplesRTOS Software Timers and Tick Accuracy1 live examplesRTOS Memory: Stacks, Heap and Static Allocation1 live examplesWriting a Bootloader: Concept and Memory Layout1 live examplesFirmware Update Protocols: XMODEM, DFU and Delta Updates1 live examplesConfiguration, Calibration and Key-Value Storage1 live examplesDesigning a Serial Protocol: Framing, CRC and Parsing1 live examplesDriver Design: Clean APIs for Peripherals and Sensors1 live examplesHardware Abstraction and Board Support Packages1 live examplesOptimising Code Size and Speed1 live examplesReal-Time Analysis: Deadlines, Jitter and CPU Load1 live examplesSafety and Standards: IEC 61508, ISO 26262, IEC 623041 live examples
Low power
Power Basics: Voltage, Current, Regulators, Decoupling1 live examplesSleep Modes Across MCU Families1 live examplesClock Gating, Frequency Scaling and Dynamic Power1 live examplesBattery Life Calculation: Capacity, Chemistry, Self-Discharge1 live examplesEnergy Harvesting: Solar, Vibration, RF, Thermal1 live examplesMeasuring Power: Multimeter, Shunt, Profiler1 live examples
Debugging and testing
Debugging with printf, Logs and LED Codes1 live examplesSWD and JTAG: Hardware Debug Interfaces1 live examplesGDB and OpenOCD: Breakpoints, Watchpoints, Memory1 live examplesLogic Analyzers: See Every Bit on the Wire1 live examplesOscilloscope Basics: Probes, Triggering, Signal Integrity1 live examplesUnit Testing Embedded C on Your PC1 live examplesSimulation: QEMU, Renode, Wokwi, Proteus1 live examplesStatic Analysis and Sanitizers for Firmware1 live examplesCI/CD for Firmware: GitHub Actions, Docker, Releases1 live examplesTop Wiring Mistakes and How to Avoid Them1 live examplesThe Embedded Troubleshooting Checklist1 live examples
Verilog and FPGA
FPGA Introduction: Hardware You Can Reprogram1 live examplesInside an FPGA: LUTs, Flip-Flops, Routing, Block RAM, DSP1 live examplesVerilog Basics: Modules, Wires, Regs and Operators1 live examplesCombinational Logic in Verilog: Mux, Decoder, Adder, ALU1 live examplesSequential Logic: Flip-Flops, Registers, Counters1 live examplesFinite State Machines in Verilog1 live examplesTestbenches and Simulation with Icarus Verilog and GTKWave1 live examplesParameters, Generate and Reusable Modules1 live examplesVHDL Introduction: Entity, Architecture, Process1 live examplesFPGA Clocking: PLLs, Clock Enables and Reset Strategy1 live examplesClock Domain Crossing and Metastability1 live examplesUART in Verilog: Transmitter and Receiver1 live examplesSPI Master and Slave in Verilog1 live examplesVGA Output: Sync Timing and Pixel Generation1 live examplesDesign a Simple CPU in Verilog (Project Preview)1 live examplesSoft-Core CPUs: PicoRV32, VexRiscv, MicroBlaze, Nios II1 live examplesConstraints: Pins, Clocks and Timing (XDC, PCF, CST, SDC)1 live examplesFPGA Toolchains: Vivado, Quartus, Gowin EDA, Open Source1 live examplesHigh-Level Synthesis (HLS): C to Hardware1 live examplesFPGA vs MCU vs ASIC vs GPU: Choosing the Right Chip1 live examples
VLSI and chip making
VLSI Career Roadmap: Front End, Verification, Physical Design1 live examplesSystemVerilog Basics: logic, always_ff, interfaces, assertions1 live examplesDesign Verification: Testbench Architecture, Coverage, UVM1 live examplesStatic Timing Analysis (STA): Setup, Hold, Slack, Corners1 live examplesCMOS Deep Dive: Inverter, Delay, Power, Short-Channel Effects1 live examplesStandard Cells and Libraries (Liberty .lib, LEF)1 live examplesASIC Design Flow: From Idea to Tape-Out1 live examplesHands-On RTL to GDS with Open Source: Yosys, OpenROAD, OpenLane1 live examplesLithography and Fabrication: How Chips Are Made1 live examplesWafer, Die Cost and Yield1 live examplesChip Packages: DIP, QFP, QFN, BGA, WLCSP, SiP, Chiplets1 live examplesMoore's Law, Process Nodes and the Future of Chips1 live examplesOpen Silicon: Tiny Tapeout, SkyWater, RISC-V and SHAKTI1 live examples
Security and reverse engineering
Chip Security: Threats, Root of Trust, Secure Elements1 live examplesSecure Boot: Chain of Trust with Signatures1 live examplesHardware Crypto: AES, SHA, RNG, ECC Accelerators1 live examplesSide-Channel and Fault Attacks (Concepts and Defence)1 live examplesFirmware Reverse Engineering with Ghidra (Ethical Use)1 live examplesFlash Programmers and Hardware Tools: CH341A, Bus Pirate, J-Link1 live examplesBIOS/UEFI, Boot Chain and the Firmware of a PC1 live examplesSecure Coding for Embedded: Input Validation, Memory Safety, Rust1 live examples
Projects
Equipment Guide: Everything You Need for the Projects1 live examplesProject 1: Blink Pro (Registers and Timers)2 live examplesProject 2: Traffic Light FSM2 live examplesProject 3: Digital Clock with 7-Segment and RTC2 live examplesProject 4: Temperature Logger with ADC, UART and SD Card2 live examplesProject 5: Wi-Fi Weather Station (ESP32)2 live examplesProject 6: PID Motor Speed Controller2 live examplesProject 7: RTOS Sensor Hub2 live examplesProject 8: Custom UART Bootloader2 live examplesProject 9: FPGA UART Terminal on a VGA Screen2 live examplesProject 10: Design Your Own 8-Bit CPU2 live examplesProject 11: Mini Logic Analyzer on RP20402 live examplesProject 12: Low-Power BLE Wearable2 live examples
Practice and career
Practice Challenges: 12 Hands-On Problems with Checkers1 live examplesInterview Questions: Embedded, FPGA and VLSI (with Answers)1 live examplesCheat Sheet: Bits, Registers, Protocols, Formulas, Commands1 live examplesCareer Roadmap: Embedded, FPGA and VLSI1 live examplesGlossary of Chip Terms (A to Z)1 live examples