In this simple tutorial, we will interface the 7 segment display with 8051 microcontrollers. we will program using Assembly language or Machine language which is very essential and the mother of all recent programming languages such as C or Embedded C.
- The digital clocks are generally used to keep track of the time. It definitely displays the time, which can be easily read by anyone compared to conventional clocks. The device uses SST89E54RDA-40-C-PIE Microcontroller (MCU), a member of the FlashFlex family of 8-bit MCU that comes with 24/40 KByte of on-chip flash EEPROM program memory.
- In this project I've explained to you about how to make a simple digital clock using 8051 microcontroller with 7-segment display. Find this and other hardware projects on Hackster.io.
- GitHub is where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
About 7 segment Display: A seven-segment is one of the most basic displays that we can display number from 0 to 9( In Binary) or 0-F (in Hexadecimal). The seven-segment display pins (a,b,c,d,e,f,g) in addition to the decimal point of both a common anode and common cathode displays are connect to port pins of LPC1768 via current limiting resistors (220 Omega).
Working principles: The Working principle of this project is very easy. The Counter will count Numbers from 0 to 9 and Loop it again and again. As the name suggests 7 segment displays with 8051 MCU, The code is written in Assembly language.
We have done some other useful tutorials using 7 segment displays such as counter from 0000 to 999 and also Full Digital clock.
Pins Configuration
Seven segments LED is a device having seven light-emitting diodes with either anode terminals (common anode or cathode) terminals. So, they form the shape of number 8.
Digital Clock Circuit using 8051 and DS12C887: In this work, a real-time clock is implemented to display the time in 24 hours mode using 8051 microcontroller and RTC chip. This type of circuit is useful for displaying time and date in homes, railways, bus stands, cars, etc.
To use this seven-segment display, once should know the pin configurations very well. As you came to know that, the display has got 9 pins in total,(Ag+DP+Common pins) but essentially, incase of Common Cathode, the display has 2 GNDs that are internally connected, so, the Sum is 9+1 = 10 pins.
A 7-Segment display has 7-segments/pins named as a, b, c, b, e, f, g to form the shape of “8” and another pin called ‘h’ for a decimal point along with two extra pins for GND when it comes to Common Cathode.
Common Cathode: All the positive terminals (Anodes) of all the 8 LEDs are connected together, named as COM Cathode. So, the negative terminals are left alone with a-g
Common Anode: All the negative terminals (Cathodes) of all the 8 LEDs are connected together, named as COM A. Then, all the positive terminals are left alone with a-g so as to connect to the port.
Components Required
- AT89C51 Microcontroller
- 7 segment display
- Crystal oscillator
- 22pf Capacitor
- Power Source 5v-9v
Circuit Diagram
Project Code
You should save the code as .asm since it’s written in Assembly language.
Project Simulation
That is the end of our simple tutorial. Hope you liked it, don’t forget to subscribe my channel at
8051 Program Counter
Digital Clock using 8051 Microcontroller
Digital Clock using 8051 Microcontroller
Codes are not working properly. After reset It shows Default time [ 5:5:5 ] and Date [ 05/05/2005 ].
With the help of 3 Switches I can Changes only Year but no other field.
Also no time increments from RTC appears.
I have changed the RTC Chip also but no improvement!
RTC I am using DS1307
Same result!
Please help!!
Can you send me the correct source code by Email.
Looking forward for your help***
Program For Digital Clock Using 8051 Programming
Thanks,
SOUMEN
Vote up!
Likes: 1You voted ‘up’
You first need to read and understand the datasheet for the DS1307. You should also be familiar with BCD.
Vote up!
Likes: 0You voted ‘up’