Connect with us

Try to build digital clock, need help

Discussion in 'Electronic Design' started by Eric, Feb 4, 2004.

Scroll to continue with content
  1. Eric

    Eric Guest

    I'm trying to build a digital clock for a final project for my high school
    digital electronics class, and I was wondering if anyone could help me out.
    My idea us to use 3 74HC390s, and then 4 seven segment displays. However I'm
    not sure exactly how I would get it working in base 12 and base 60 for time,
    and I'm not sure how I would get it to reset when it reached 12:59. I also
    am not sure of how I would be able to get a solid once second pulse to run
    the timers. Any help would be greatly appriciated.
  2. 1Hz pulse, take xtal, divide.
    Or take mains frequency and divide.
    PIC microcontroller would make it easy...
    Would not bother with normal logic.
  3. Tim Wescott

    Tim Wescott Guest

    Solid 1 second pulse: get a 74HC4060; it's a 14-stage counter with a
    built-in oscillator. You can hook it up to a 32.768kHz watch crystal and
    get 2Hz which you can divide down to 1Hz, or a 1.6384MHz crystal and get
    100Hz and divide down with a 'HC390 (_and_ have 100ths of seconds no

    Quick & dirty 1 second pulse: 555 timer. Use a tantalum or ceramic cap, an
    aluminum electorlytic won't work at 1Hz. Or set it for 100Hz and use the
    same pair of '390s.

    Divide by 6: This is a bit harder with the HC390 because of it's
    asynchronous clear. One way to make this work is to watch for a six on the
    data output and clear the chip when it happens. Your clock will get a
    little "blip" of 6, but it'll go back to normal too soon to see. You can
    look for the 6 with an AND gate on QC and QB. You should probably stretch
    this pulse (with a 555 as a monostable multivibrator) for reliable

    Reset on 12:59: Don't. Use a counter that goes from 0-11 (with your nifty
    divide-by-six), and display 1-12 with it. Then you'll reset correctly.
  4. Another tactic used here is to use a counter chip that has 'preset' data
    inputs. With this kind of counter, pulsing the 'set' input causes the
    counter to assume whatever value is on the 'preset' data inputs. So, when
    you detect a 12 on the output (using logic gates), you trigger 'set', and it
    changes back to 1 and starts counting up again.

    And yet another possibility is to simply use a clock chip, with all this
    logic built into it. But you won't learn nearly so much that way :)
  5. Eric

    Eric Guest

    Hey thanks a ton for the help. I was just looking at the 74HC4060, and I'm a
    little confused on what it does. It looks like a chip that counts in binary
    to 16,384, but I'm not sure exactly how you would get it to reset at either
    60 or 12 by looking on the fairchild spec sheet. Also, would you suggest I
    use 3 of these chips for mins, hours, and seconds? Also, is there a chip
    that can run 2 seven segments displays simultaneously, or would i have to
    get it to carry using one chip (sorry I forget the number), and then use a
    second one?
  6. Tim Wescott

    Tim Wescott Guest

    The 4060 is just to get the clock (1Hz or 100Hz) for the 'HC360s. You still
    need to build the rest of your clock after that. I'd concentrate on the
    clock itself and worry about a timebase later (but this depends a bit on
    what your teacher is enthusiastic about).

    The TTL 7-segment display chips all want to take in four bits and display
    one segment -- so you have to use one per digit, or use complex sequencing

    Are you hard and fast committed to the 'HC390? Another poster suggested
    other chips which may not be a bad idea -- particularly since I was
    forgetting about display chips. To count from '1' to '12' you can make a
    '12' detector and use an HC160 -- then you can load the thing to '1' and
    never have to worry about that pesky '0'.
  7. Eric

    Eric Guest

    I'm acutally not really commited to any particular chip. I'm just
    brainstorming ideas at the moment. A lot of these chips your talking about
    I've never even heard of or used, so I'm open to absolutley any suggestions
    on the best way to do this. However I can tell you that using an IC that is
    just a "clock" would not be acceptable for the project. I'm using Circuit
    Maker 2000 to design the circuit as well, and some of these chips don't seem
    to be in that program. As for worrying about the actual clock portion of the
    project (which was what I thought you were talking about before, shows how
    much I know...), what exactly would you suggest. I'm not familiar with any
    chips that count 0-11 (I'm not really familiar with any chips besides a 555
    though), so could you maybe suggest one. Sorry if I'm asking too much, but
    just reading the stuff you guys write makes me realize that I know next to
    nothing about this stuff.
  8. Yet another idea for you: Google for "clock schematic", perhaps along with a
    couple of the part numbers you're interested in using. You'll probably come
    up with a lot. (I tried Googling for "nixie clock schematic", since "nixie
    tubes" are a type of display which only hobbyists use these days, and came
    up with plenty of hits.)
  9. Tim Wescott

    Tim Wescott Guest

    The challenge of designing with 7400 series logic is finding parts that do
    the most for you. Go to the web page of someone who still makes them
    ( is one, I think ON semiconductor or Motorola does as
    well). Search for "counter" -- there's lots of selections.

    You may also consider using a microcontroller like the AVR or a PIC (made by
    Atmel and Microchip, respectively). If you hook it up and write the code it
    won't just be applying a "clock" chip and it'll be much more relevant to
    today's professional world. Send your instructor to me if he disagrees.
  10. Eric

    Eric Guest

    Hey I was wondering if maybe you could give me a specific link. I searched,
    but most of the schematics I found didn't have the type of chip listed used
    or anything. Also, do you know of any schematics that are based on 74xx
  11. Probably the best resource for this stuff is a document from Texas
    Instruments (they have a very wide selection of standard logic chips).

    While it does not contain the actual data sheets, it can serve as an
    overview of what's available.

    You find, for example, that a divide by 12 counter is still available:
    The SN74LS92. Whether you can get it at the corner shop is another
  12. Chris Carlen

    Chris Carlen Guest

    I agree. There may be a justification for the teacher to want the
    project done with real hardwired logic, since it is a digital logic
    class. But it would be a good idea to ask if you can use a
    microcontroller. You can make a clock with a microcontroller that can
    do all sorts of "features" that would be a pain in the butt to do with
    logic chips.

    And the skills learned will get you started with microcontrollers,
    which, should you continue with electrical engineering as a career, will
    be essential.

    Good day!
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day