Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Strange problem with day counter in DS1307

Status
Not open for further replies.

CMOS

Advanced Member level 3
Joined
Jan 6, 2004
Messages
862
Helped
94
Reputation
186
Reaction score
50
Trophy points
1,308
Location
USA
Activity points
5,673
Hi,
I recently encountered a problem with DS1307 RTC. The day counter jump from Wednesday to Saturday and then Monday, Tuesday, Wednesday again Saturday, Monday and so on..... i.e 1,2,3,6,1,2,3,6....
After a week of debugging my microcontroller firmware I finally came to know that DS1307 is faulty. Rest all other counters in it are working fine. When I replaced it with a new one, everyting worked ok. And replacing back the old one still creates problem.

Has anyone seen such a strange problem in DS1307?
 

ds1307 problem

I use hundreds of 1307 except a few where the xtal is not oscillating I never had a problem with functions and I also use the weekday and other "goodies".

best regards
 
ds1307 not oscillating

CMOS said:
Hi,
I recently encountered a problem with DS1307 RTC. The day counter jump from Wednesday to Saturday and then Monday, Tuesday, Wednesday again Saturday, Monday and so on..... i.e 1,2,3,6,1,2,3,6....
After a week of debugging my microcontroller firmware I finally came to know that DS1307 is faulty. Rest all other counters in it are working fine. When I replaced it with a new one, everyting worked ok. And replacing back the old one still creates problem.

Has anyone seen such a strange problem in DS1307?

Hi.
DS1307 is perfected.
Yould should review a your I2C functions.
Initilation DS1307 is (PIC 18F8720 with C18):
CH_and_Second = byte_read(0);
byte_write(0x0,CH_and_Second|0x80); // Second & CH = 1
byte_write(0x7,0x90); // OUT = 1
byte_write(0x0,CH_and_Second&0x7f); // CH = 0
The another location is default. My project is runing with about larger 2000 pieces DS1307. All of them is initilated with there code.
 

ds1307 xtal problems

CMOS,

I had similar experience with a small batch of DS1337 , and again, the code was right, but using new ICs from different batch solved the problem.
 

weekday in ds1307

IanP said:
CMOS,

I had similar experience with a small batch of DS1337 , and again, the code was right, but using new ICs from different batch solved the problem.
Did you had the same "Day" register problem?
 

ds1307 how to check

Problem was with register 04h = Date.
Bit 4 was always '0': after day 9 counter went back to 00,. after second 9 conter was 20, after 29 - 20 and 21 (if monyh had 31 days) and back to 00.
Took me some time to find this this pattern and consequently bit 4.
 

ds1307 dont work with battery

Please Clear CH Flag before read or write DS1307
 

ds1307 day register

conkhicon,

I am under impression that you do not carefully read our posts: THIS WAS NOT SOFTWARE PROBLEM !!! THE ICs had internal fault..

And now I think this topic is closed..
 

ds1307 monday

THE ICs had internal fault..
I don't think that. If it's true Dallas is broken long time ago.
I am sure that the incorrection are Write_I2C or Read_I2C, You should check and debug or simulator carefully this functions. Usage Keil simulator with I2C DLL.
at http://www.c51.de/c51.de/Dateien/uVision2DLLsGe.php?UIN=
 

problems with ds1307?

It seems that the IC was defective, provided that the replacement worked OK, isn't it?

After all, sometimes it happens...
 

mcc18 ds1307

You May Exceed the absolute Maximum ratings or soldering temp (which are defined in datasheet) in your first chip so it may be damaged.

Second Check that in all times you use DS1307 When the 5 VCC is Connected
you must also connect its Backup Battery to work properly.

check that if VCC and BackUp Battery are SET Exactly in their proper ranges.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top