There are 256 drawers. Here only the first 16. Our drawer 0x05 (PORTB) is highlighted. Memory addresses (0x20-0x2F) in parentheses.
๐ฆ Drawer 0x05 ยท PORTB
address 0x05 (0x25)
Inside this drawer there are 8 switches. Switch number 5 is connected to the LED on the board.
7โ
6โ
5D13 ยท LED
4โ
3โ
2โ
1โ
0โ
LED on board (D13):Off
sbi5,5; turn on switch 5 of drawer 5 โ LED ONcbi5,5; turn off switch 5 of drawer 5 โ LED OFF
๐ This is not magic. It's just opening and closing a switch.
๐ฏ Why ATmega328 is perfect to start:
Simple architecture
Few registers, clear instructions: you immediately understand what each line does.
Documentation and support everywhere
You find thousands of examples, projects, guides, forums, and books.
Very cheap (especially if you use clones)
An original Arduino Uno or Nano board costs around โฌ20-25, but compatible clones with the exact same microcontroller can be found for โฌ3-5. Perfect for learning without breaking the bank.
Actually used in the real world
Still today in toys, industrial products, control units...
Zero complications
No Wi-Fi or complex stacks: just pins, registers, real code.
Old but complete
It has everything: interrupts, timers, UART, ADC, PWM... it's a real gym to learn everything that exists even in modern micros.
โ ๏ธ THE FRIGHTENING TRUTH about modern microcontrollers
ESP32, STM32, Raspberry Pi Pico look tempting, but look what awaits you:
๐Gigantic IDEs โ Arduino IDE 2.0: 300MB. VS Code + PlatformIO: 500MB. STM32CubeIDE: 1.2GB. One gigabyte just to write "blink".
๐Massive SDKs โ ESP-IDF: 10GB of toolchain, 5000+ files. Your "hello world" includes 2MB of Bluetooth stack you'll never use.
๐ง You must learn C (or MicroPython) FIRST โ Variables, pointers, functions, classes, interrupts, RTOS... months of study before touching hardware
๐ฎEverything is hidden โ `digitalWrite()`? That's 47 lines of assembly you'll never see. The magic stays magic.
โฌ๏ธ WITH ATmega328 + costycnc.it:
> Open your browser โ costycnc.it/avr1/compiler.html
> Write: sbi 5,5
> Click "Assemble" โ HEX generated instantly
> Click "Upload" โ select your Arduino via Web Serial
> LED turns on. That's it.
> Zero installation. Zero MB download. Zero drivers. Zero setup.
With ATmega328 + costycnc.it, YOU are in control. Not the IDE. Not the SDK. Not the framework. Just you, the browser, and the chip.
โก First learn the real basics
If you understand how a simple micro works, then you can use any modern microcontroller without being confused.
โFirst learn to turn on an LED with a single instruction. Then build everything else on top.โ
๐ The modern technology paradox
Today we live in a super technological world, but paradoxically very few people really understand how electronics work.
๐ Everything has become easy to use: apps and devices hide complexity. They work, but nobody knows how.
๐ Understanding is no longer needed: just click. But without understanding, you learn nothing.
๐ Too much useless complexity: complicated IDEs, huge SDKs, libraries that do everything but make everything opaque.
๐ So many get discouraged and end up copy/pasting code without knowing what it does.
With CostyCNC AVR1 you go back to the essence. One line at a time. Real registers. Real microcontrollers. Real learning.