Summary of Digital Clock Using Microcontroller 89C52/89S52
This simple mini project teaches how to build a digital clock using an 89C52 (or 89S52) microcontroller, interfaced with a 16x2 LCD and selectable 12/24-hour modes via input pins. It uses Proteus for simulation and Keil for compiling; port 1 is input (mode selection), port 2 is output to peripherals. The article outlines required components and gives an example C code snippet initializing time variables and checking mode pins.
Parts used in the Digital Clock Using Microcontroller 89C52 89S52:
- Microcontroller 89C52 (89S52 also acceptable)
- Ceramic capacitors 22pF (2 pieces)
- Reset switch (button)
- Electrolytic capacitor 10uF, 25V
- Crystal oscillator 11.0592MHz
- 16x2 LCD display
- Resistor 10k
Components required:
- 1 microcontroller 89C52(89S52 will also do)
- 2 ceramic capacitors-22pF
- 1 switch(button for reset purpose)
- 1 electrolytic capacitor-10uF,25V
- 1 crystal oscillator-11.0592MHz
- 16×2 LCD display
- 1 resistor-10k
Software you will need
This project has been done in proteus software.If you are new to proteus software, the tutorials given below may get you started with the software.note:if you are familiar with proteus you can skip this part.
- What microcontroller is used in this digital clock project?
The project uses the 89C52 microcontroller and states 89S52 will also do. - Which pins select 12 hr and 24 hr modes?
P1_4 grounded activates 12 hr mode and P1_5 grounded activates 24 hr mode. - Which port is used as the input port?
Port 1 of the 89C52 is used as the input port. - Which port is used as the output port?
Port 2 of the 89C52 is used as the output port. - What display is used for showing time?
A 16x2 LCD display is used in the project. - What software is used to simulate the project?
The project has been done in Proteus software. - What compiler is used to program the microcontroller?
The Keil compiler is used for programming in this project. - What crystal frequency is required?
The project uses an 11.0592MHz crystal oscillator.

