Digital clock using 8051 microcontroller & LCD display – mini project

Hello friends, today we are going to make a simple digital clock using 8051 microcontroller which you can make as your engineering mini-project. In this mini project we are using one 8051 family based microcontroller, one 16×2 LCD display and one 4×4 keyboard for settling the time.

Components required:

For making simple digital clock using microcontroller you will require following components:

Sr. no. Component Quantity
1 Microcontroller (P89V51RD2) 1
2 LCD display (16×2) 1
3 4×4 keyboard 1
4 Resistor 10K 1
5 Capacitor 33pF 2
6 Capacitor 10uF 1
7 12MHz Crystal 1

Circuit diagram:

A circuit diagram for simple digital clock using 8051 microcontroller is shown below:

digital clock using 8051 microcontroller and LCD display

Circuit building:

Connect the 4×4 keypad with port 1 of microcontroller. Connect 16×2 LCD display with port 2 of microcontroller (make sure that all the data pins of LCD display are connected to the microcontroller correctly). The rs (register set) pin of  LCD is connected to pin 3.5 (pin number: 15) and en (enable) pin is connected to pin 3.6 (pin number 16) of microcontroller. Connect crystal to pin 18 and 19 of micro controller. We are using 12MHz frequency Crystal. For reset circuitry connect a push button to pin 9 of micro controller. We can also use a potentiometer to adjust the contrast of LCD.

Pin description of LCD display:

lcd pin diagram

Pin number Name Description
1 Vss Ground
2 Vdd +5V
3 Vee Contrast Adjustment ‐2V to ‐5V
4 RS Register Select
5 RW 1 ‐Read , 0‐Write
6 E Enable Strobe
7 D0 Data Line
8 D1 Data Line
9 D2 Data Line
10 D3 Data Line
11 D4 Data Line
12 D5 Data Line
13 D6 Data Line
14 D7 Data Line
15 LED+ Backlit LED +V Vdd (Optional signal)
16 LED- Backlit LED +V Vdd (Optionalsignal)

Download:

You can download C program and HEX file for this mini project using following link.

Download

You may also like:

I hope you liked this microcontroller project. Share it with your friends and like our facebook page to keep in touch with us. Have a nice day!