Animated preview of the working digital clock system.
This project features a fully functional Digital Clock system designed using an AVR Microcontroller (ATmega32). The system maintains an accurate 24-hour time format (HH:MM:SS) and outputs the data to an LCD display (LM016L). It combines precise firmware timing with a professional hardware simulation in Proteus.
- Precise Timekeeping: Utilizes internal Microcontroller Timers to ensure 1-second accuracy for real-time tracking.
- 24-Hour Format: Automatically handles time overflows (60 seconds to 1 minute, 60 minutes to 1 hour, 24 hours to reset).
- Interactive Controls: Includes hardware reset and manual adjustment capabilities via push-buttons.
- Visual Interface: Displays real-time clock and date data on a 16x2 character LCD.
- Hardware: ATmega32 Microcontroller (AVR Architecture).
- Software/Firmware: C Language (main.c).
- Simulation Tool: Proteus Design Suite.
The following flowchart represents the operational logic of the system, including initialization, time incrementing, and display refreshing.
The system follows a structured execution path to ensure real-time accuracy:
-
Initialization Phase:
- I/O Ports: Configures Port B and Port D as outputs for the LCD data and control lines.
- LCD Setup: Initializes the LM016L screen in 16x2 mode and clears the display.
- Variables: Sets the initial time values.
-
The Main Loop (Infinite):
- Time Tracking: The system monitors for a 1-second trigger (via Timer or Delay).
- Increment Logic:
- Seconds increment by 1.
- If
Seconds == 60, they reset to 0 andMinutesincrement by 1. - If
Minutes == 60, they reset to 0 andHoursincrement by 1. - If
Hours == 24, the clock resets to 00:00:00.
-
Display Update:
- The microcontroller converts time values to ASCII and updates the LCD display with the formatted
HH:MM:SSstring.
- The microcontroller converts time values to ASCII and updates the LCD display with the formatted
- main.c: The core C source code containing the timing logic.
- digital_clock.pdsprj: The Proteus simulation file for hardware verification.
- Clock_report[1].pdf: Detailed technical documentation.
- flowchart.png: Visual logic flowchart of the firmware.
- Animation.gif: Animated preview of the working system.
- Simulation: Open
digital_clock.pdsprjin Proteus and click the 'Play' button. - Firmware:
- Open
main.cin an AVR compiler (e.g., Microchip Studio). - Compile the code to generate the
.hexfile. - Load the
.hexfile into the ATmega32 component within Proteus.
- Open
