DS1307 Clock Freeze in Battry Supply

Status
Not open for further replies.

arvinfx

Member
Hi, I use a DS1307 and it's work perfect then supply power is in Vcc.
But when i disconnect Vcc in 02:40 and one hour late I connect the Vcc unfortunately time is 02:40 ....!

any one have this proglem whit this IC?
 
Hi, I use a DS1307 and it's work perfect then supply power is in Vcc.
But when i disconnect Vcc in 02:40 and one hour late I connect the Vcc unfortunately time is 02:40 ....!

any one have this proglem whit this IC?

hi,

What back up battery are you using with the DS1307.???
 
Hi,
I had faced the same problem and found that the battery was weak, changed the battery and it was OK.
check the battery voltage and also check the battery connections!
 
HI

I use the lithium type of battery (Maxell CR2032 3V) 3.2v in voltmer .
And i Change it to 2.5 volt battery and my problem not solved.

The clock and Run BIT set whit this line :

I2CWRITE SDA,SCL,$D0,$00,[$00,$55,$18,$01,$2,$12,$08,$00]

It is correct?
 
Last edited:

hi,
I use a 3V lithium battery, works OK.
Look at these images.

It sounds like the DS1307 is being stopped at power down for some reason.
Can you post your code.?
Use the '#' menu symbol when you post code.
 

Attachments

  • esp01 Dec. 11.gif
    11.6 KB · Views: 242
  • esp02 Dec. 11.gif
    20.3 KB · Views: 293
  • esp03 Dec. 11.gif
    10.8 KB · Views: 347
hi,
I use a 3V lithium battery, works OK.
Look at these images.

It sounds like the DS1307 is being stopped at power down for some reason.
Can you post your code.?
Use the '#' menu symbol when you post code.

Hi

I test my Buttery Current in short-Circuit and it was 25ma.

yes i can post my code read and write on my IC correctly . I use the MicroCode Studio Plus .

I change to # but compiler give an error for this symbol !!!

My project is temperature and i save the yesterday temperature at any o`clock on the DS1307 and show it on today ... I can read and write very easy and correctly on any where of the ram of my ds1307.!

I see the pictures and thanks to your attendance
 
Hi

I change to # but compiler give an error for this symbol !!!

hi,
I dont mean use the '#' for compiling.????

When you post your program source code text to the forum, use the '#' symbol.

example:
post your program to the forum.
SELECT [highlight] all the code you have posted
and then click the '#' symbol on the upper menu bar of this message box.

This will keep the formatting for you code correct... without the '#' your code will be displayed as a text list, without any formatting.. OK.?
 


Aw! sorry

Code:
[B]@ DEVICE    HS_OSC
'@ device wdt_off
INCLUDE "modedefs.bas" 
define OSC 20
DEFINE LCD_BITS 4 'LCD bus size 4 or 8 

DEFINE LCD_DREG PORTA 'LCD data port 
DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4 

DEFINE LCD_RSREG PORTD 'LCD register select port 
DEFINE LCD_RSBIT 0 'LCD register select bit
 
DEFINE LCD_EREG PORTD 'LCD enable port 
DEFINE LCD_EBIT 1 'LCD enable bit 

DEFINE LCD_LINES 4 'Number lines on LCD 
define lcd_commandus 2000
define lcd_dataus 1000
' DEFINE I2C_SLOW 1

symbol sda = portd.2
symbol scl = portc.3 
   



h var byte 
m var byte
s var byte
' Read time Secs,Mins,Hours,Day,Date,Month,Year,Control
I2CWRITE SDA,SCL,$D0,$00,[$00,$22,$01,$27,$6,$11,$08,$00] ' Write to DS1307
pause 10


read_1307:


I2CREAD SDA,SCL,$D0,$00,[s,m,h]
  
lcdout $fe,1,"Time=",hex2 h ,":",hex2 m  ,":",hex2 s
pause 1200
goto read_1307[/B]
 
Last edited:
Thanks to all my problem is resolved

dear ericgibbs u and CCD

I scope the crystal and i see when i dis connect the Vcc the sin wave of crystal goto dead line in 2-3 sec ! i check the battery and find in my circuit capacitor connected between gnd and battry ! i remove it and anything is now okay !
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…