free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
8051 Projects [ projects based on 8051 ]

Digital Clock with Alarm Using DS1307 and 8051 (updated)
Author Ajay
Author email bhargav.ajay@gmail.com
Author website www.rickeyworld.info
Bookmark this download
Description <img src="http://www.8051projects.net/images/tested.png" alt="Project tested and working perfectly" width="175" height="40"><br><br>
DS1307 is a hardware realtime clock, which works on I2C protocol. Better graphics using the same old fashioned alphanumeric LCD (type HD44780). Icons which shows the status for Alarm ON/OFF state, which gives a nice and cute look to the clock.

There are four switches connected to the uC, as shown in the figure. Function of the keys are same as clear from their names.

When the power supply is switched on it will give you the default date and time, but later you can change it to the desired value. After setting once, the backup battery will keep the clock ticking even after the power is not there.

A little about I2C:
There are basically four main conditions in I2C protocol.
1) Start Condition
2)Stop Condition
3)Data Validity
4)Acknowledgement

1)Start Condition:
when SCL is high and SDA H->L, will be taken as start condition for the communication.
2)Stop Condition:
when SCL is high and SDA L->H, will generate a stop condition.
3)Data Validity:
When SCL is high there should be no chande in SDA line only then the data is valid, the data change should be made only when SCL is low.
4)Acknowledgement:

After sending of one byte of data the reciever has to acknowledge the sender for the successful reception. for this the sender make the SDA line high and reciever pulls down the SDA low, which tells the sender that data has reached safely.

Now the source code written in assembly, basically implements the I2C protocol. the assembly source written for Keil download here clock.asm and the direct hex file for programming the controller from here clock.hex. The schematic for the Digital clock is available in PDF format can be downloaded from here clock.pdf.

Project code has been revised and updated. Bug fixes regarding corrupt display.

History:
First Upload date:
08/05/2006
Image
Filesize 95.36 kB
Date Saturday 17 July 2010 - 15:05:25
Downloads 31207
Download
Rating
 6.0 - 12 votes 

Comments



Microcontroller ebooks Projects codes examples bogdan | 23 May : 15:36
Hello Rickey. Can you put also the scheme in this archive?
Reply to this  

Microcontroller ebooks Projects codes examples ajay | 26 May : 01:27
yes i've uploaded that orcad schematic in a new archive. please check!
Reply to this  

Microcontroller ebooks Projects codes examples Anonymous | 05 Jun : 20:24
hey men

i check the asm file with the A51 assembler and it have 50 errors

are you sure its ok?
Reply to this  


Microcontroller ebooks Projects codes examples Ajay | 26 Jul : 03:24
yes its 100% correct and its compatible with "A51 Macro Assembler" not just A51. and Macro assembler comes under Keil. please download the software from www.keil.com
Reply to this  


Microcontroller ebooks Projects codes examples lawalite | 04 Jul : 19:40
needs hex code for 2nd & 3rd line of sanyo lcd 4x16
Reply to this  


Microcontroller ebooks Projects codes examples saiswathip@yahoo.com | 25 Jul : 07:31
sir we need a free download of digital clock using ds1307 interfaced with 89c51.u have givn ur sight in which we r unable to download as it is not free.we need a free download.

thanx for responding to my mail...

thank u..
Reply to this  

Microcontroller ebooks Projects codes examples swathi | 26 Jul : 00:25
i have a 1x16 lcd

Reply to this  


Microcontroller ebooks Projects codes examples Ajay | 26 Jul : 03:21
well this is for 2x16 if u want it in one line.. then many changes have to be made please understand the code and make the changes...
Reply to this  


Microcontroller ebooks Projects codes examples abhisek | 14 Nov : 05:58
Hello ricky,
I have tried your c programng for digital clock using ds1307, but it is not working. It canot read from RTC and also canot write. I am using keil c compiler. please help!
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 14 Nov : 06:19
Everything is fine in the program.
how you are checking the reading and writing?
i hope you have downloaded the new files.
and please post the problems in the forum.
Reply to this  


Microcontroller ebooks Projects codes examples viper_k3 | 21 Feb : 07:31
hi
the program has 595 errors with a51
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 21 Feb : 10:28
Please read the previous comments. The program is compatible with A51 Macro Assembler which comes with keil sofware. not simple A51 assembler.

Please post your problems in the forum
Reply to this  


Microcontroller ebooks Projects codes examples tuppakarthik | 22 Jul : 04:17
where can i find the program in C??? and when i used ur assembly program it is showing two different time formats switching each second. I am using a 89c51/lcd/232/rtc/I2c kit (NSK electronics), how shall i modify the program for this kit???
Reply to this  


Microcontroller ebooks Projects codes examples tellarun | 28 May : 08:12
Dear Sir, I facing a few problems with this project.
Some times i don't get any display in the lcd & it hangs off.
After getting the display Digital Clock.... I get some junk displayed over the day and seconds. The alarm triggers of few minutes in advance. Have i gone wrong any where... I flashed the uC with the hex file i didn't do any kind of reassembling.... Pl. Help & do mail me if there are any updates for this project. my email ID: tellarun@yahoo.com

Reply to this  

Microcontroller ebooks Projects codes examples sa3eeeed | 21 Jul : 12:05
thnx man
Reply to this  

Microcontroller ebooks Projects codes examples Anonymous | 22 Oct : 19:11
do you have picbasic code for this alarm clock?plz email me if u have...thanks
email:fhcaine@yahoo.com
Reply to this  

Microcontroller ebooks Projects codes examples zeus | 20 Dec : 01:45
hello sir ,
we are prepareing a digital clock using 89c51 along with dallas 1307 having LED display.
we are facing problem related to alram seeting.we need your help
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 20 Dec : 02:07
Zeus, Please make use of forum. Will surely help you out.
Reply to this  


Microcontroller ebooks Projects codes examples tanveer | 27 Dec : 09:42
Hello sir,
I want to do this project for my final year ,i think this is a good project . I need pcb design for this project. Can u help me for making pcb ?
Reply to this  

Microcontroller ebooks Projects codes examples tanveer | 14 Jan : 23:55
I made this project but it is not working properly.First it shows "digital clock" next it ask for time and alarm set. the time will not run and all numbers are distorted... plz help me. mail me at tannumohd@gmail.com.
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 15 Jan : 03:52
tanveer please make use of forum and if possible provide a screenshot.. to know the problem better.. one recommendation is. check for any loose joint or connection.
Reply to this  


Microcontroller ebooks Projects codes examples kanth | 23 Jan : 05:05
i have da pcb diagram
Reply to this  


Microcontroller ebooks Projects codes examples tanveer | 26 Jan : 11:53
can u mail me that pcb design to tannumohd@gmail.com
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 26 Jan : 12:32
Share the design with us please.. we will add your contribution in download section.
Reply to this  


Microcontroller ebooks Projects codes examples Anonymous | 10 Jan : 23:25
can you please send the design of digital clock to me at mailmesant@in.com
Reply to this  


Microcontroller ebooks Projects codes examples Ajeesh V R | 06 Feb : 04:53
Dear Ajay,
we are assembeled the ciruit,and used hex file provided in the net,but we didnt get any clock display.We are getting some dark dislay in one line alone.Also we found that hex file size is around 10kB ,which controller we have to use?

please suggest us....
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 06 Feb : 12:16
check your circuit carefully, and use forum.
Reply to this  


Microcontroller ebooks Projects codes examples Ajeesh V R | 19 Feb : 02:59
Dear Sir,
Project hardware is checked properly,and when we switch on it shows "digital clock"on the diaplay and also accepts alarm settings,time settings clearly.after this once it starts running in clock mode many characters are distorting ,the same problem is observed by Thanveer also.Could you please help me to overcome this problem?


Reply to this  


Microcontroller ebooks Projects codes examples Rasel | 15 Feb : 06:47
RA

Reply to this  


Microcontroller ebooks Projects codes examples tanveer | 18 Feb : 07:05
Dear ajay,
this project is not working properly,the clock is not running. some other deploma & engg college students did this project but for them also it is Failure project. i want to contact with u, can u give your mob no.....I have only one month to complete the project. so plz help me..
Reply to this  

Microcontroller ebooks Projects codes examples abhishek_h | 21 Feb : 01:36
Ajay,
I have assembled the LCD and 1307 on a bread board and connected to AT89S52 board via FRC cable.Initially all the digits looks like blocks, but even after setting the values, the same display returns. sometimes the seconds start counting but again it resets in few seconds. I believe the problem is in communicating with the RTC. but i am not able to figue out exactly what is causing it. i have checked the connections.
Reply to this  

Microcontroller ebooks Projects codes examples neil shah | 20 Mar : 02:01
hiii ajay,,,, thanks for giving such a good facility....
i just need ur help that the program u have given which is not working on simple A51 assembler... it givees 402 errors... i reduced almost to 382....but still its tough...so can u plz give me a link by which i can download A51 macro assemler ?
thanks for the project...
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 20 Mar : 15:55
please use forum for getting help.
code does not have any errors in it. will explain you once you post in forum
Reply to this  


Microcontroller ebooks Projects codes examples oma | 18 Jun : 06:29
I want to convert this project to display in the 16X64 matrix LED. What changes should I make in the circuit and the C program files? Please help.
Reply to this  

Microcontroller ebooks Projects codes examples Najib | 30 Jun : 11:47
Sir, Is it possible to set 4 or more alarms in just 24 hours? can you give me some ASSEMBLY language reference? please.... Especially on how to program the AT8series or 8051 Microcontrollers...please do reply..THank you..
Reply to this  

Microcontroller ebooks Projects codes examples Jeetu Das | 14 Oct : 02:30
hello ajay ru there, i want to ask you a think relating to your design of rtc clock using 8051 and ds1307 , i am facing a problem the characters are garbled i have tried replacing lcd ds ic and 8051, crystals, etc, can you pls tell me where i am wrong?
Reply to this  

Microcontroller ebooks Projects codes examples Amit9988 | 15 Oct : 06:38
Sir give some Keil code(C code) for DS1307 interfaceing with AT89C51 Microcontroller. Thank You.......

Reply to this  

Microcontroller ebooks Projects codes examples Jeetu Das | 17 Oct : 01:48
I found out where did i made the mistake regarding garbled or junk display, i was not using network resistor for the pull up resistor, was using ordinary res. I check some other's pcb design and solved the problem. And please use a good quality DS1307 IC
Reply to this  

Microcontroller ebooks Projects codes examples Anonymous | 17 Oct : 03:33
can we get a code in assembly language for this? rather than in .hex format?
Reply to this  

Microcontroller ebooks Projects codes examples mehdijamshidi79@yahoo.com | 03 Nov : 05:03
hello ajay ru there, i want to ask you a think relating to your design of rtc clock using IC AT89C20518051 +help+picture
sir we need a free download of digital clock+program assembly to 8051
sender IRAN
Reply to this  

Microcontroller ebooks Projects codes examples Anonymous | 20 Jan : 21:55
sir iam from sikkim,its not uplading what is the problem its verry important for me .please give a reason
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 16 Feb : 09:24
PLEASE USE FORUM IF YOU HAVE A DOUBT!
Reply to this  


Microcontroller ebooks Projects codes examples Zai.apex | 02 Mar : 09:33
if i want multiple alarm times what changes are required in coding. .... URGENT!!!
Reply to this  

Microcontroller ebooks Projects codes examples Zai.apex | 03 Mar : 05:32
Sir, I need help ... What if i want multiple alarm times???
Please reply soon.
Reply to this  

Microcontroller ebooks Projects codes examples Anonymous | 15 Mar : 08:21
can i ask panu poh mgconnect sa computer ng hardware ntin...
we made ng digital clock in pcb tpos my programming kami..kso di sya nagcconect....

anu poh kaya yun pin configuration ng printer port to hard ware nmin..
please help me..!!
Reply to this  

Microcontroller ebooks Projects codes examples !!! | 14 Apr : 08:12
sir, we used your code and we get only the default display in the LCD... The hex code seems to be 9K in capacity and our IC can hold only 4K... What do we do about this?
Reply to this  

Microcontroller ebooks Projects codes examples uq1bnk@gmail.com | 23 Aug : 11:05
sir,i need the ckt and c code(for keil compiler)for digital alarm clock.So plz help me.
Reply to this  

Microcontroller ebooks Projects codes examples manojramnani | 29 Sep : 00:47
I made this project but it is not working properly.First it shows "digital clock" next it ask for time and alarm set. the time will not run and all numbers are distorted... plz help me. mail me at manojramnani88@gmail.com
Reply to this  

Microcontroller ebooks Projects codes examples amtahir786@yahoo.com | 02 Oct : 01:17
good site for education
Thanks
Reply to this  

Microcontroller ebooks Projects codes examples praful1k@rediffmail.com | 01 Nov : 21:33
sir,I'm contacting u for 100% correct code in C for Keil because I'm hobieast not from electronis engg. i done my Auto. Engg. so I understand only C code. Please Sir or sombody help me to out this......................Thanx...
Reply to this  

Microcontroller ebooks Projects codes examples abid_khan1101@yahoo.com | 15 Dec : 12:43
please sombody help 2 snd the code for digital clock in c++......
Reply to this  

Microcontroller ebooks Projects codes examples abid_khan1101@yahoo.com | 15 Dec : 13:31
sir i also need for 100% correct code in C for Keil. Please Sir or sombody help me to out this......................Thanx.
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 16 Dec : 13:54
the code is correct
Reply to this  


Microcontroller ebooks Projects codes examples Anonymous | 19 Mar : 01:08
hello sir,
can u send me the PCB design file for DS1307 RTC.

Regards,
Rajashekharreddy.M
rajashekharreddy_m@yahoo.com
Reply to this  


Microcontroller ebooks Projects codes examples karan2280 | 24 Jan : 00:35
Ajay Sir,

I have made this clock and it is working ... How I want to convert or create a LED based clock.
I have 7 segment using 5 mm LED, each line of segment has five LEDs.
Please help me to connect this with atmel 2051 and DS1307.
Power supply : 7805 (for Motherboard) 7812 (for LED segment)
Please help.

Thanks,
Karan
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 22 Mar : 07:00
use forum please.
Reply to this  


Microcontroller ebooks Projects codes examples rex24 | 28 Mar : 05:13
sir i want the source code for alarm clock in 8051.. can you help me with this pleaseeeee
Reply to this  

Microcontroller ebooks Projects codes examples emirico | 29 Mar : 17:45
sir,where i can get a5a1 macro assembler?
Reply to this  

Microcontroller ebooks Projects codes examples preetijoli | 01 Apr : 04:50
few doubts in understanding the code. plz help

1. can macro and endm be used in keil microvision?
2. in run1 label r6 is initialised 3fh, that means acall receive (in here label)operation takes place 63 times, why?
3. what exactly is rtc initialisation, means with what time the clock starts? we do 11 initialisations, sendin content of r0 ,and r1. r0 has sec to amin, but what is r1 for?

please clear the above doubts. thanks.
Reply to this  

Microcontroller ebooks Projects codes examples Herel | 20 Apr : 22:09
Hi there,

do you have done the similar project but using motorola 68000 microprocessor?

thanks in advance.
Reply to this  

Microcontroller ebooks Projects codes examples blinkychan | 21 Apr : 08:02
anyone knows pinout of lcd (J2)?
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 22 Apr : 04:08
see LCD tutorial in tutorial section:
http://www.8051projects.net/microcontroller-tutorials/
Reply to this  


Microcontroller ebooks Projects codes examples blinkychan | 08 May : 07:56
hex file has size of 9282b, but c51 mcu has only 4k flash. Why?
Reply to this  


Microcontroller ebooks Projects codes examples Ajay Bhargav | 11 May : 08:46
thats the size of hex file not the code. use it without any fear.
Reply to this  


Microcontroller ebooks Projects codes examples digital_electronics@rediffmail.com | 27 Jun : 04:23
dear sir, we want to make a digital clock with using ds 1307 and 89c51.
we are working with "umps" assembly language. we want to display on seven sigment.
pl. help.
Reply to this  

Microcontroller ebooks Projects codes examples thank | 21 Jul : 07:05
thank you! i am vietnammes
Reply to this  

Microcontroller ebooks Projects codes examples chitresh | 24 Jul : 07:20
sir plz mail me all the codes and circuit on my mail chitreshb@gmail.com
Reply to this  
Submit comment

Subject
Username:
Comment:



Google Search for Microcontrollers!

Google
 

© 2010 Rickey's World

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems