Program For Digital Clock Using 8051

  1. Program For Digital Clock Using 8051 Microcontroller
8051 program counterAssembly code for digital clock using 8051
  • Digital Clock in Assembly Code for a 8051 microcontroller using EdSim51 simulator. In this project, you are required to design a Digital Clock. You may use three neighbor memory addresses (RAM) to show the digital clock; for example, you may use RAM addresses 30H, 31H, and 32H respectively to show seconds, minutes, and hours (refer to Figure1).
  • The figure shows, real time clock interfacing with 8051 microcontroller using I2C bus protocol. I2C is a bi-directional serial protocol, which consist of two wires such as SCL and SDA to transfer data between devices connected to bus. 8051 microcontroller has no inbuilt RTC device therefore we have connected externally through a serial.
  • The program for RTC (Real Time Clock) using 8051 is written in Embedded C (using Keil compiler). We begin by including “ LCD8bit ” library into the program. It is a user defined library for interfacing microcontroller with LCD module in 8 bit mode.
Program

8051 Development board: So if you have this board it will be better so that you can easily upload the code by yourself. Seven Segment Display: In this project we are using six Common Anode Display. USB to UART converter: This is 9 Pin D type male Connector For RS232 O/p.

80518051 program counter

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 partitioned into two independent program memory blocks. It is 8051 compatible MCU with embedded SuperFlash memory. In addition, the device uses a seven-segment display to make the time visible for everyone.


As soon as the VCC supply is provided to the circuit, the clock starts from 00:00. The time is displayed on four seven segments (in common anode configuration) by using the concept of multiplexing. This is achieved by using timer interrupt, which is configured to refresh seven segments. The segments are refreshed a couple of times in a second for simultaneous display. The clock runs with a delay of exactly one second. The data pins (a–h) of all the segments are interconnected and receive signal from port P2 of the microcontroller. The control or enable pins (common anode) are connected to pins 1-4 of port P1 (P1.0 – P1.3). The number on 4th segment (displaying the unit digit of second) is incremented once in a second as it goes from 0 to 9. The number on 3rd segment is incremented after every 10 seconds from 0 to 5. Thus, seconds are displayed varying from 00 to 59. The digit on the 2nd segment is changed after every 60 seconds from 0 to 9 and so on.

Program For Digital Clock Using 8051 Microcontroller


The device can be seen anywhere in the world that may be noticed in the office or at home. This can be integrated to appliances for auxiliary feature and such applications may be observed in FM radios, televisions, ovens that has built in digital clocks.