here is the code
when power on the system it start displaying date & time,but when I turns power off then again turn on the power it displays initial value not updated value
#include
void _nop_(void);
#define delay_us _nop_(); //generates 1 microsecond
#define LCD P0
sbit RS=P2^0;
sbit EN=P2^1;
sb

Hello All,
I'm interfacing ds1307rtcwith8051 using proteus simulator , I have written the code and the seconds part is working fine but the hour and minutes are showing as 0 and is not getting updated . I believe there's some timing issue or the ds1307 register is not getting updated (...)

when compiling this code it will give warning
c(2): warning C318: can't open file 'ds1307.h'
is this a problem??how to solve it
Yes, it is a problem.
If the ds1307.h header file is located with the other C source files of your project, you may have to change the <> to "" as such:
#include

hi
i our project,we have connected 89lv51 withrtcds1307.
here we set the time as
time23:59:36
date31/10/12
and displayed on that time, we are getting the is incrementing and displayed on hyper.but some times, it is showing ?.
time23:59:36
date31/10/12
time23:59:37
date31/10/12
time??:??:??
d

Hi friends,
I am doing a Digital Clock using rtcds1307 and 89C4051 micro controller.
Time is displayed on LCD and different alarms can be set through 3 switches.
I have written the following code for updating rtc registers first time. Only minutes code is shown
//Minutes
min++;
if((min>15)&&(min<20))
{
onmin=min+6;
}
else i

how can i learn programming using keil in i2c interface . what basics should an individual know if i have to connect ds1307 to controller , i have to create automatic college bell so i have used ds1307 as rtc but i m not able to get how should i do programming in keil .can anyone help me .. . how should i get a delay of one hour through (...)

For the time being, forget about pin .. unless you really need a square wave synchronized with time .. and BTW, input P2.3 has internal pullup ..
The main connections between the CPU and the rtc are the 2 I2C lines, and you have them ..
As far as various components go, the crystal caps are to big and the reset cap is to small ..
The most comm

The ready made clock chips available, usually use mains frequency as refernce and thus the accuracy highly depends on the same. But you can get dead accuracy withrtc interfaced with a microcontroller. But In the ds1307 as it uses external cylinderical crystal, the accuracy may not be guaranteed. But using a DS12887 module (...)

Hello Ram,
Hav a luk at the attachment.
This code is written for 89c51(interfacing 89c51 withrtcds1307 using I2C communication)
Hope this will help yu.
Feel free to contact me if yu have any queries regarding this.
Best Regards,
Viswanath.

sir,
my project name is smoker's counselor we are using 89C52 micro controller.
it has 3 blocks 1.smoke detector 2.lcd interfacing 3.audio output.
when smoke comes it will detected by the smoke detector and a message like QUIT SMOKING will displayed in the lcd and same will come through audio output.
so here when smoke comes then only lcd is di

First you read and understand the I2C protocol.Ten you will understand how to read the time from rtc.Then just compare the codes given above and try to understand what it is actually doing..
Regards
Sajeev

I have working circuit with8051-micro and ds1307rtc.
Every second it transmits time and date via serial port in the ASCII format.
What I need to do is to add 0.1s time base so it sends time and date not every secon but every 0.1s and time format should look like this: hh:mm:ss.x
Where can I have this 0.1s from?

Hiii,
I am working on a board which has the rtc and working with AT89s52 chip. I downloaded some sample codes from the net for rtc but could get anyting which works.
have any of you come across any rtc code which works?
Thanks
Adhiteev