AT89C4051 as RTC V1.1 UPDATED

Ajay Bhargav    mailto:ajay_bhargav@hotmail.com

If you are looking for the simplest project, you are at the right place.

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

Figure 1: Circuit Diagram for Digital 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.

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.



Figure 2: user defined character

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


Figure 3: Demo RTC with larger fonts

NOTE: If you think that there is a problem in the availability of the chip mentioned in the schematic, then you can also use AT89C51/AT89C52, make sure that you are using the same port for LCD and switches which are there in the C-file or in the schematic.
The schematic contains the power supply module also, which is not shown in the figure above.
For any help regarding the project please mail me anytime.


    Bill of material required
Sr no.
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
Part name
AT89C4051
LM7805
20x4 line LCD
IN4001 diode
11.0592MHz Crystal
10K POT
10K resistors
8.2K resistor
Push Button Switch
30pF capacitors
10uF capacitors
0.1uF capacitors
9V Battery
Quantity
1
1
1
1
1
1
3
1
3
2
2
1
1




Please send me your feedbacks regarding the project at ajay_bhargav@hotmail.com
For any help regarding the project please mail me anytime.