This is an old revision of the document!
Author: Petcu Tudor-Mihai, grupa 333CD
The purpose of this project is to build an interactive digital puzzle game based on the ATmega328P Xplained Mini development board. The game will run directly on a 16×2 LCD, where the user will see the current level, the remaining time, and the puzzle state. The user will interact with the system through a keypad, while a bi-color LED and a buzzer will provide visual and audio feedback.
The main idea behind the project is to create a simple embedded game that combines display control, keypad input, timing logic, and feedback signals. The project started from the idea of a simple access system, then evolved into a puzzle box concept, and finally became a fully digital puzzle game displayed on the LCD. This version is more practical, easier to test, and better suited for the available hardware.
We chose this idea because it is interactive, easy to demonstrate, and allows us to combine several topics studied during the laboratory sessions, especially interrupts, timers/PWM, and UART for debugging. We think the project is useful for us because it gives us practical experience with both hardware and software integration.
The project is built around the ATmega328P Xplained Mini development board, which controls all the hardware components. The system has the following main modules:
A simple logical flow of the system is the following:
The project can be described using the following software states:
The following block diagram presents the main hardware modules of the system and the way they interact. The ATmega328P Xplained Mini is the central control unit. It receives input from the buttons, controls the LCD, drives the servo motor, activates the buzzer and LEDs, and can optionally communicate with a PC through UART for debugging.
The ATmega328P Xplained Mini development board is the main controller and coordinates the entire system. Unlike a standalone microcontroller mounted directly on a breadboard, this board already includes the basic support circuitry, the programming interface, and the USB connection, which simplifies both development and debugging.
The LCD will display the current level, the timer, and game messages such as:
The keypad will be used as the main input device. It replaces separate push buttons and allows the user to start the game, confirm actions, reset the round, and potentially navigate through levels or menu options.
The buzzer will provide sound notifications:
The bi-color LED will provide simple visual feedback:
The breadboard is used for the external hardware connections, such as the buzzer, LED, resistors, LCD interface, and signal routing between the development board and the external components.
The 10 kOhm potentiometer is used to adjust the contrast of the LCD.
The firmware will be developed in C for AVR using PlatformIO as the main development environment. PlatformIO is useful for this project because it offers an easier build system, project structure, library management, serial monitor support, and firmware upload integration.
At this stage, the implementation is still in progress, so this section presents the general software structure and the main ideas that will be used in the final version.
For the moment, the project mainly relies on standard AVR headers and basic low-level control of the microcontroller peripherals. Depending on the final implementation, simple helper modules may be added for:
At this stage, the focus is on understanding and controlling the hardware directly, without relying too much on complex third-party libraries.
The software will be organized into simple functional modules, each responsible for one part of the system. A possible structure is the following:
The exact number of source files may change during implementation, but the software will follow this modular idea.
The project will be based on a finite state machine, because the application naturally moves through several distinct stages. The most important software states are:
The main software logic will include:
At a general level, the firmware is expected to work as follows:
This project is a good example of combining embedded programming with interactive user input and simple game logic. Even though the implementation is still in progress, the project already has a clear structure and a well-defined goal.
From an educational point of view, the project is useful because it brings together several important concepts studied during the laboratory sessions, such as UART, interrupts, timers / PWM, I2C, GPIO usage, and hardware debugging.
The final objective is to obtain a complete and functional digital puzzle game that is simple enough to be implemented with the available hardware, but also complex enough to demonstrate practical embedded systems design.