A question on DS1307

Discussion in 'The Projects Forum' started by harisudharsan, May 9, 2014.

  1. harisudharsan

    Thread Starter New Member

    May 6, 2014
    Hi All,

    A very warm greetings to the members of the team.

    I am new to electronics and circuits and this would be my first attempt in the practical electronics. (So please answer in very basic/layman terms )

    I am doing a background work and collecting and comparing various circuits for creating a digital clock (using 7 seg display).

    I was looking for a circuit with basic CMOS chips 74xx. But I did not find many circuits online (found few in youtube. But schematics are not provided) and also they said chips like 555 are not great to be used for creating clocks as there can be around 2-3 seconds +/- difference in a day. (Please let me know your views on this).

    During the process I found few circuits that uses various RTC chip.

    I decided to keep my attempt simple as this is the first time. I decide to go with DS1307 (RTC chip). I was thinking that, this chip is going to do all the magic and all I have to do is to provide a power supply and connect it to a 7 segment (along with its driver if required). But in the below links they have provided schematics to connect it through PIC/microcontroller/counter/shift register etc (AT89c52 and 74LS595). I am unable to understand the purpose of those.

    Can some one help me with a better circuit if you have. Since I am from computer background, i can understand the program they have provided for the PIC. But I do not know to use a PIC Kit to deploy that program into the chip.



    I found the below circuit is made out of basic CMOS chips. Is there any visible flaw in that circuit ? Please provide a proper flow diagram if somebody has on the below circuit. The schematic looks full. But I see the connections are hanging. I am unable to understand what to connect and where.


    To avoid using the PIC and microcontroller is it possible to use any CMOS chips ?

    With Regards,

    Last edited: May 9, 2014
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    A clock of any kind is not a beginner's project. Can you really see yourself wiring up all the connections for the "Digital Clock 2" without making a mistake, or just making mistakes you can find and fix before something burns out?

    A 555 is terrible for accuracy, the DS1307is very old and needs a computer to read it.

    If you are good at programming then I'd suggest perhaps backing into electronics by using micros? The PICkit Debug Express (may have that name wrong) gives you a small development board and a programmer/debugger along with tutorials to do many basic micro tasks (accept push button inputs, light LEDs, read analog voltages) that are useful building blocks.

    Everyone builds a clock one day. Wait till yours is awesome.

  3. MrChips


    Oct 2, 2009
    If you are new to electronics, building a digital clock is an excellent project but not for the first project.

    Learn to walk before you run.

    You can begin by experimenting with 555 timer circuits and making LEDs flash.





    Then move on to a single 4-bit binary counter and also a 0-9 BCD counter.

    Next comes interfacing to a 7-segment LED display.

    This will help you along your way to building a digital clock. For that, you don't use a 555 timer. You will use a 32768Hz quartz crystal oscillator instead.

    But let's take one step at a time.
  4. harisudharsan

    Thread Starter New Member

    May 6, 2014
    Thank you very much for the suggestion.

    At this point i would say i am quite confident in making the connections. I am basically from computer background. So I am quite confident on my programming skills. But the only problem is I do not have the required hardware to interface the PIC with the computer to deploy my program. I know a PIC kit would do that. But i am unable to find it in the local electronic shop.

    I have done LED flashing using the 555 before. But with that knowledge, i cant call it as my first project because i just linked the components on the bread board as per the diagram i found on the net and it did worked well. Also i know what did that time and why. Things were pretty straight forward.

    Also, by theory i know what a multiplexer and the basic components do. But I haven't done a practical circuit with it. ( I read it as a paper during my masters).

    Now i want to try them practically. So thats why i choose to begin with a clock.

    Now it would be great if I know if can replace the PIC controller on this circuit with any CMOS chip. Also since DS1307 has the time output legs, can i connect it to a 7 segment display directly through the BCD to 7 seg driver.

    With Regards,
  5. MrChips


    Oct 2, 2009
    We are here to help you on your journey and provide you with useful advice and information.

    You may have a master's degree and may be an experienced programmer. If you want to gain experience in hardware it is hard to beat actual hands-on experience.

    Your lack of knowledge of CMOS, 74xx devices and DS1307 can lead you to a dead end or down a very frustrating and unrewarding path.

    My advice is to ignore the DS1307 and pursue the path that I have provided for you.
    harisudharsan and absf like this.
  6. absf

    Senior Member

    Dec 29, 2010
    If you must use discrete logic chips to make a RTC, then the link that you've provided would be considered very doable. Provided you're able to find the TIL311 or DIS1417 LED displays. I have some left-over from making the 1802 ELF computer and they were not cheap and rare.

    The reason the clock circuit is so simple was because the TIL311 is actually a 7-seg LED display with 3 TTL chips encapsulated in one package. Namely a latch, 7 seg-decoder and driver.

    Your can further simplify the circuit by displaying the Hours and minutes only with 4x TIL311 and add a "divide by 60" circuit after the one second clock output from the 4060.

    For me I would take a look at MrChips' blog here....

    Mr Chips' MSP430 24 hour clock with calender

    You can get the MSP430 Launcher for $9.90 and it was formerly sold at $4.30 during promotion. A programmer is built-in the SBC and the language used is "C". The IDE was downloadable from TI's website free of charge.

    Once you get the LCD clock working, you might take a look on how to interface the multiplexed 7 segment display to the MSP430 and finally replace the LCD with LED display. All these are in MrChips' blog. Even you dont want to do them, It would make an interesting read.


    Last edited: May 10, 2014
    harisudharsan likes this.
  7. harisudharsan

    Thread Starter New Member

    May 6, 2014

    Thank you very much for the reply. !

    As i mentioned my post, i am a beginner into the practical electronics. So at this time i do not want to get into embedded design because I am too young for that now. Thats why i thought of trying with some CMOS chips.

    As far as 7 seg is concerned, i am not too particular about that kind of dot matrix display as It is shown in the example. I am absolutely ok with the regular 7 seg displays.

    But as MrChip mentioned i would first go through the basics at now. But i shall restart the same thread at later point.

    Thanks for now.

  8. harisudharsan

    Thread Starter New Member

    May 6, 2014
    Hi MrChips,

    I certainly agree with you.
    I wish to park the DS1307 for now.

    I tried to make a simple circuit with SN74ALS138N (DEMUX) chip. I had it with me handy. I brought it long back when i was over enthusiastic to make some electronic circuit long back.

    I just want to check the basic logic of the chip if it works fine as per what I read in the theory. But surprisingly I did not get the answer I wanted. I have opened a new thread. Can you kindly have a look at it and let me know where I go wrong.

    Note: I am not sure if I have to attach any capasitor/resistor etc in the circuit. I just want to try the logic for now. So I tried giving HHH as the input in the A,B,C legs.

    Please let me know what was the problem with that.

    With Regards,