๐Ÿ‡ฎ๐Ÿ‡น IT ๐Ÿ‡ฌ๐Ÿ‡ง EN

๐Ÿค” WHY ATmega328?

Why start with ATmega328 and not with a modern microcontroller?

You saw CostyCNC AVR1 and asked: "Why such an old micro?" Here's the answer.

๐Ÿ—„๏ธ ATmega328P โ€” I/O REGISTERS (addresses 0x00 - 0x0F) First 16 drawers
0x00 (0x20) res
-
-
-
-
-
-
-
-
0x01 (0x21) res
-
-
-
-
-
-
-
-
0x02 (0x22) res
-
-
-
-
-
-
-
-
0x03 (0x23) PINB
7
6
5
4
3
2
1
0
0x04 (0x24) DDRB
7
6
5
4
3
2
1
0
0x05 (0x25) PORTB
7
6
5
4
3
2
1
0
0x06 (0x26) PINC
-
6
5
4
3
2
1
0
0x07 (0x27) DDRC
-
6
5
4
3
2
1
0
0x08 (0x28) PORTC
-
6
5
4
3
2
1
0
0x09 (0x29) PIND
7
6
5
4
3
2
1
0
0x0A (0x2A) DDRD
7
6
5
4
3
2
1
0
0x0B (0x2B) PORTD
7
6
5
4
3
2
1
0
0x0C (0x2C) res
-
-
-
-
-
-
-
-
0x0D (0x2D) res
-
-
-
-
-
-
-
-
0x0E (0x2E) res
-
-
-
-
-
-
-
-
0x0F (0x2F) res
-
-
-
-
-
-
-
-

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
โ€‘
5
D13 ยท LED
4
โ€‘
3
โ€‘
2
โ€‘
1
โ€‘
0
โ€‘
LED on board (D13):
Off
sbi 5,5 ; turn on switch 5 of drawer 5 โ†’ LED ON cbi 5,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:

โšก 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.

With CostyCNC AVR1 you go back to the essence. One line at a time. Real registers. Real microcontrollers. Real learning.

โšก Start now with CostyCNC AVR1

2 euro. One USB cable. Write sbi 5,5 and watch the LED turn on. That's how you start.