Replacing DS1307

Discussion in 'General Electronics Chat' started by R!f@@, Mar 26, 2015.

  1. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    I ran into a little problem.
    The circuit consists of a 16F628 driving a serial 7 Segment Mux. Basically on timer or stopwatch, event timing
    thingamabob :D.

    PIC timing is taken from a RTC DS1307.
    Problem came with reversing the power leads blowing the regulators.
    Thing powers up now scan the segments and goes to function 1 ( there are four functions)
    Buttons work. Cycles thru functions.

    One problem the timer does not function. No count down or up and stop watch. It just sits there.
    So me guessing it could be no RTC as the PIC is sending serial info to drivers.
    Replaced the DS1307 and still no clocking.

    Tried with this and only one function works. When powered up the on timer clocks only. No stop timer clocking or lap counter....nothing.

    I connected all the cable to DS1307 solder pads.

    So I checked the DS1307 to PIC connection and SDA and SCL is used ( DUH !! ) as usual plus the square wave output. The DS chip uses a 32KHz crystal ( did replace that but nada ).

    Me just guessing here..could it be the new DS is not giving out the square wave output.
    How do I enable that.
    Still why the new DS chip is not working the on timer as with new RTC module???
    Could it be the PIC is fried somewhat. I mean some ports ?
     
    Last edited: Mar 26, 2015
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,607
    Sounds like you want this thing to act like a clock pulse. However, you need to set the internal DS1307 registers thru the I2C bus to get it to work.
     
  3. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    For that I need to have the source code of the PIC, right ?
    All I got is the HEX.
     
  4. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    Is it possible to program the DS1307 separately and put it back into the project ?
    Will the DS1307 loose it's settings if the backup is disconnected ?
     
  5. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    Doesn't this chip need a "backup" battery? A 3v cellcoin?

    I made a clock circuit on a breadboard with a PICAXE and a RTC chip. Each time the PIXACE started, it send some data the the RTC, to get it started. In the documentation I think it was mentioned that to keep track og time, it needed a 3v cellcoin, or some sort of power.

    I made it on a breadboard just to "proof of concept".
     
  6. MCU88

    Member

    Mar 12, 2015
    360
    35
    You don't need to have the DS1307 real time clock to make an accurate time-keeping device. You can get away with just using the PIC's internal timers and interrupts. Have made lots of accurate clocks using just an MCU implements internal hardware and coded in C. Accuracy of +/- a second a day.
     
  7. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    The thing is, it is a ready made thing and I have only the HEX for the PIC.
    I need to find if the RTC is working on not.
    I don't the have the time to learn the Serial protocol to program another PIC so that it can send the Data to a serial MUX that drives the huge LED segments.
    It has four functions. Like stop watch. Up counter down counter and sorta time display too.
     
Loading...