+ Reply to Thread
Results 1 to 12 of 12

Thread: DS1307 Clock Freeze in Battry Supply

  1. #1
    arvinfx Newbie
    Join Date
    Nov 2008
    Posts
    47

    Default DS1307 Clock Freeze in Battry Supply

    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?


  2. #2
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,797
    Blog Entries
    13

    Default

    Quote Originally Posted by arvinfx View Post
    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.???
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  3. #3
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    The DS1307 is a very reliable RTCC the biggest problem I've had was forgetting to set the run bit.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  4. #4
    CCD
    CCD is offline
    CCD Newbie
    Join Date
    Jul 2008
    Location
    Chennai, India
    Posts
    67

    Default

    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!

  5. #5
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    I like the DS1388 as it has a trickle charger for supercaps.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  6. #6
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,797
    Blog Entries
    13

    Default

    Quote Originally Posted by blueroomelectronics View Post
    The DS1307 is a very reliable RTCC the biggest problem I've had was forgetting to set the run bit.
    hi Bill,
    I would bet he hasn't got a backup battery connected.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  7. #7
    arvinfx Newbie
    Join Date
    Nov 2008
    Posts
    47

    Default

    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 by arvinfx; 11th December 2008 at 05:40 AM.

  8. #8
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,797
    Blog Entries
    13

    Default

    Quote Originally Posted by arvinfx View Post
    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?
    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.
    Attached Images
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  9. #9
    arvinfx Newbie
    Join Date
    Nov 2008
    Posts
    47

    Default

    Quote Originally Posted by ericgibbs View Post
    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

  10. #10
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,797
    Blog Entries
    13

    Default

    Quote Originally Posted by arvinfx View Post
    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.?
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  11. #11
    arvinfx Newbie
    Join Date
    Nov 2008
    Posts
    47

    Default

    Quote Originally Posted by ericgibbs View Post
    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:
    @ 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 
    Last edited by arvinfx; 11th December 2008 at 10:35 AM.

  12. #12
    arvinfx Newbie
    Join Date
    Nov 2008
    Posts
    47

    Default

    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 !

+ Reply to Thread

Similar Threads

  1. ds1307 real time clock ic
    By baftab in forum Datasheet/Parts Requests
    Replies: 4
    Latest: 9th July 2007, 03:35 AM
  2. Using the DS1307 as a 32KHz 16F877 Clock
    By William At MyBlueRoom in forum Electronic Projects Design/Ideas/Reviews
    Replies: 0
    Latest: 24th October 2006, 02:20 AM
  3. real time clock ds1307 interfacing with 8051
    By siprax345 in forum 8051/8951
    Replies: 13
    Latest: 12th May 2006, 05:41 AM
  4. How to freeze the trace?
    By atferrari in forum General Electronics Chat
    Replies: 10
    Latest: 6th August 2005, 08:18 AM
  5. battry
    By ua741 in forum Datasheet/Parts Requests
    Replies: 1
    Latest: 15th February 2005, 12:27 AM

Tags for this Thread