You Are Here: Home » AVR ATmega Projects » AT89C4051 to work as a Real time clock

AT89C4051 to work as a Real time clock




Its a digial clock which make use of AT89C4051 to work as a Real time clock.

Figure 1 shows the circuit diagram for the digital clock. Port 1 of the controller (AT89C4051) is used as the data lines for the LCD (starting from pin 7- pin14 of LCD). As you can see there is not much change in the hardware except the LCD, here i am using a 20 x 4 lines LCD display.

clock

In figure 3 as you can see the digits are bigger than the normal size. For this purpose i’m maiking use of the CGRAM of the LCD, which gives the flexibility to the user to define user defined characters. so to create a character we first need to get the values which are to be written into the CGRAM area. The CGRAM area starts from address 0x40 and for every character there are 8 locations which are to be written. Figure 2 shows the custom character creation.

so when we get the values for all the pixels. we write these values to the CGRAM. the Digit 0 – 9 can be created with the help of eight such custom characters.
NOTE: You can only create upto 8 custom characters.




The source code for the project is written in C-language, and compiled using Keil C compiler, you can download the c-code, schematic, and if you don’t have a cross compiler then you can directly burn the HEX file on to your chip clockV1.1

Full circuit diagram can be downloaded from here Circuit

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Low-Power Chip
Imec Presents Low-Power Chip for Intra-Cardiac Ventricular Fibrillation Detection

San Francisco, USA – February 19, 2013 – Imec demonstrated a low-power (20µW), intra-cardiac signal processing chip for the detection of...

Close
Scroll to top