A Tetris game running on an ATmega128 microcontroller, displayed on an 8×8 RGB LED matrix.
Authors: Axel Fouet & Noam Levy — May 2025
| Component | Port |
|---|---|
| WS2812B LED panel (8×8) | Port B, pin PB1 |
| Rotary encoder + button | Port E |
| LCD screen | Port A + C |
| Push buttons | Port D |
Flash the program at 4 MHz.
- Enter your name using buttons 1–4 at startup
- Press the encoder button to start the game
- Rotate the encoder left/right to move pieces
- Press button 0 to pause/resume
- When the game ends, your score is saved and displayed for 3 seconds
| File | Description |
|---|---|
main.asm |
Entry point, main loop, interrupts |
tetris.asm |
Game logic (movement, collision, score) |
lcd_routine.asm |
LCD display routines |
angular_encoder.asm |
Encoder input handling |
memory_utils.asm |
Memory manipulation macros |
eeprom.asm |
Save/load name and score |
random.asm |
Pseudo-random piece selection |
led_64.asm |
WS2812B low-level driver |