Connect with us

5 Digit Digital stop watch using a MC14553b and TIL 311

Discussion in 'General Electronics Discussion' started by blures, Apr 29, 2013.

Scroll to continue with content
  1. blures

    blures

    18
    0
    Apr 29, 2013
    Hi guys

    Im trying to design a digital stop watch that is precise to 0.01 seconds. I want it to have 5 digits and time up to 9 minutes 59.99 seconds, and have a button for start/stop and seperate one for reset the digits to zero.

    I plan to use the MC14553 as a binary counter and a TIL 311(which both decodes the binary input coming from the MC and then displays the corresponding digit) for each digit of my display. However I am not sure how to go about. I know I will have 5 TIL 311, but how many MC14553s do I use?

    If anyone has any ideas of how to approach this it would be much appreciated.

    Thanks
    blures
     
    Last edited: Apr 29, 2013
  2. blures

    blures

    18
    0
    Apr 29, 2013
    An MC14553 is a 3 digit bcd counter, so I could use one for 1/100 seconds(first display), 1/10 seconds (second display), and 1 seconds(third display). And then use another MC14553 for 10 seconds(fourth display) - in this case, my fourth display should only be able to count up to 6 - and then finally minutes (5th display). If I did it this way, how could I use just one clock pulse to perform all of the counts?

    Thank you
     
    Last edited: Apr 29, 2013
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    I don't think you'll be able to use the MC14553 because there's no easy way to make it reset at 60. It contains three BCD counters and counts up to 999, and the counter outputs are not all available simultaneously - it uses a multiplexed output. It's a specialised part with limited usefulness and is much more likely to be discontinued than, say, a 4017. (Not that I'm suggesting that you use a 4017.)

    I would do this with a microcontroller. Do you have any experience with them? The Microchip PIC devices are widely used and development setups are inexpensive and well supported by many forums.
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Doing this with a microcontroller would be *far* easier.

    It's quite likely that the counter can't be configured for /6 /10 /6
     
  5. blures

    blures

    18
    0
    Apr 29, 2013
    Thanks the replies. I do not have access to any microprocessors or programable chips in my lab, I have no experience how to use them either. I only have access to fairly basic ICs,and I know I need to use some kind of binary coded decimal counter, a clock pulse, and a led display with an inbuilt bcd decoder.
     
    Last edited: Apr 29, 2013
  6. blures

    blures

    18
    0
    Apr 29, 2013
    Couldn't I just use a seperate binary counter for each different digit? The counting to 6 is a secondary issue at this point, something I feel like I could solve once I have figured how to count to 99.99 seconds
     
  7. blures

    blures

    18
    0
    Apr 29, 2013

    What do you mean that the counter outputs are not all available simultaneously? Why is this an issue?
     
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    It looks like you may be able to use five separate MC14553s. You will have to disable the multiplex oscillators (tie pin 4 either high or low) and ensure that the devices all receive a pulse on MR on startup so they all present the ones digit on their outputs.

    You will need gating on the tens-of-seconds counter that counts 0~5, that detects an output pattern 0110 and resets the counter. You can take the clock for the next digit from the bit 2 output of this 0~5 counter, and from the bit 3 output of the 0~9 counters. Luckily the counters advance on the falling edge of the clock input.
     
  9. blures

    blures

    18
    0
    Apr 29, 2013

    Thank you very much for you reply. Just few point I'd like clarification on. Could I use one chip to display my first 2 digits 1/100,1/10 and then connect bit 4 of that to the clock pulse of the next chip which is counting 1s, Connect bit 4 of this to the clock pulse of the 10s chip. For the first chip I would need the clock impulse at a frequency of 100hz? Can I just use on clock impulse at the first chip? So you are saying to then make an AND with bit 4 of chip 2 and bit 3 of chip 3 and say thats the clock pulse going into my last chip(the one for minutes)?
    The chip counts in BCD, is there an easy to convert it into MOD 5? - like you said, I will need this for my third chip. Alternatively, I believe I could just make a MOD 5 using jk flip flops. On that note, is the much purpose in using this chips at all if I am unable to use the multiplexing function? I could just simplier binary counters.
     
    Last edited: Apr 29, 2013
  10. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Maybe. You may be able to use one MC14553 for the rightmost three digits (hundredths of seconds, tenths of seconds, and seconds), but you'll need to use two more for the tens of seconds and the minutes digits. This is because you need full-time access to the outputs of the tens of seconds counter so you can make it reset at 6 instead of 10. So your leftmost two digits will have to be non-multiplexed. I assumed you would want all digits to operate the same; in that case, you would need five MC14553s.

    If you want to run the rightmost three digits multiplexed, you'll need an enable input on each of the displays. Do they have one? Since they have logic inside them, they may also have an enable input. If not, you could cycle the power to them. That requires buffer transistors.

    Yes, you should be able to make the tens of seconds digit count modulo 6. The counter for that digit needs its multiplex oscillator disabled, so the count is always asserted on the four output pins. You need to detect a value of 0110 binary; you can do this by feeding bits 1 and 2 into an AND gate (use a CD4081 or just diodes, for simplicity). When the AND gate output goes high, reset that counter only, using its MR input. You must also issue an MR to all of the counters at startup, especially the non-multiplexed ones, so they will assert their ones digit on the outputs.

    Re the clocks, you just need a 100 Hz clock going into the first MC14553. The counters within that device are internally chained, and you need to chain the other two counters in the same way. The tens of seconds counter is clocked from the overflow output of the first device, and the minutes counter needs to be clocked from bit 2 of the tens of seconds counter, so that it increments when the tens of minutes changes from 5 (0101b) to 0.

    Personally I would use five MC14553s and avoid the multiplexing issue entirely, since you can only do it for three of the five digits. That would make for a tidier design that was easier to understand.

    Edit: You can get a 100 Hz clock from a 32000 Hz watch crystal, by dividing by 320 using a ripple carry counter like a CD4040.
     
    Last edited: Apr 29, 2013
  11. blures

    blures

    18
    0
    Apr 29, 2013
    I think I will take you up on using the 5 seperate chips, to take out the complicating factor of multiplexing . Good, so I only need one external clock pulse. Im not sure I have access to a watch crystal, I was planning just to use a CMOS 555. Would that work?
    "the minutes counter needs to be clocked from bit 2 of the tens of seconds counter, so that it increments when the tens of minutes changes from 5 (0101b) to 0."
    - tens of minutes? do you mean tens of seconds?
    -how do I make that counter stop counting at 101?
    "You need to detect a value of 0110 binary; you can do this by feeding bits 1 and 2 into an AND gate (use a CD4081 or just diodes, for simplicity)"
    -A bit confused:if I am making it stop counting at 101, then won't I never get 110?
    Just to clarify, I am applying a master reset at start to display 0:00:00 right?
     
  12. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    A 555 will oscillate at 100 Hz but it's not accurate.
    Yes, I meant tens of seconds.
    To make a counter count from 0 to 5 you need to reset it immediately when it reaches 6. You do this with an AND gate as I described. You don't "make it stop counting" at 0101.
    Yes, you need to reset all the MC14553s at startup. Not just to set the display to all zeros, but also to enable the ones digit on the outputs (multiplexing is disabled).
     
  13. blures

    blures

    18
    0
    Apr 29, 2013
    Il try and find something a bit more accurate. I'm not I follow when you say "enable the ones digit on the outputs" - i.e.the binary input 0001?
    thanks a lot for your help
     
  14. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    The MC14553 has a multiplexed output. There are four output pins. The chip multiplexes the outputs in three phases. First it feeds the value from the ones digit counter (actually, from the ones digit latch) to the output pins and asserts the first display select, then the second, then the third, then back to the start. This is all controlled by the multiplex oscillator. If you're not using multiplexing, you need to ensure that the ones digit output is always selected. According to the data sheet, an MR will do this. Then you just need to disable the multiplex oscillator by tying pin 4 either high or low (doesn't matter which).
     
  15. blures

    blures

    18
    0
    Apr 29, 2013
    Yes, I see the distinction now, when you say according to the data sheet, are you refering to the truth table on page 2? (Im looking at the data sheet for MC14553B). If so, Im not sure I follow how an MR will only make the ones digit selected. I thought its function was to only make the the bcd outputs all 0. So when the first counter reaches 9, we implement the MR to make it go back to zero - what do the other digits have to do with it? (assuming I already disabled the multiplexing oscillator)
     
  16. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    When the ones digit counts above 9, it internally resets to 0. It's a BCD counter. That action also increments the tens digit, but you will only be using one digit per MC14553. No, I'm referring to the text description on page 5, which says "The Master Reset input, when taken high, initializes the three BCD counters and the multiplexer scanning circuit. While Master Reset is high the digit scanner is set to digit one; ..."
     
  17. runem

    runem

    1
    0
    Apr 29, 2013
    I really think you should check out the 74HC/HCT390 and 393. They are both dual counters in a single package and you should also be able to configure them to divide by 60 or 100, by making connections between the pins, with few or no extra components.
    It's been a time since I played with them both, so I don't remember how things was done, but study datasheets and examples, and you will be good friends with these very versatile chips.
     
  18. blures

    blures

    18
    0
    Apr 29, 2013


    Doesn't it need to be clocked by the same AND gate that is reseting the counter? If its clocked by bit 2 only won't it the next counter be implemented when 4 is being displayed?
    And for MC14553s that have been cascaded previously, I'm just using the overflow of the previous chip as the clock pulse, correct?
    On an nnother note, could I make the frequency of a square wave generated by a cmos 555 more precise if I make it generate first 200hz and then put a toggling flip flop after to get 100hz with 50-50 duty cycle?
     
    Last edited: Apr 29, 2013
  19. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    That would improve the duty cycle, but not the accuracy. A 555 timer is not likely to give you .01 second accuracy over 10 minutes. Far from it in fact, you would be lucky to get accuracy of 6 seconds over 10 minutes (1%). You need 1 part in 60000 accuracy. Only a crystal can do that.

    Bob
     
  20. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    I agree with runem; the MC14553 is not the best choice for this application.

    The minutes counter should be clocked from bit 2 of the tens of seconds counter. These counters are all clocked on the falling edge of their clock inputs. When the tens of seconds reaches 4 (0100), the clock to the minutes counter goes high, but nothing happens because it's falling edge clocked. When the tens of seconds changes to 5 (0101), nothing happens. When it changes briefly to 6 (0110) nothing happens, but as soon as it resets to 0, which is almost immediately when it reaches 6, bit 2 changes from 1 to 0 and the minutes counter will increment. That's the behaviour you want. It's not a good idea to clock a counter from the output of the AND gate because the pulse there is pretty short - just long enough to reset the counter.

    For the other counters, the next counter should be clocked from bit 3. This bit changes from 0 to 1 when the count reaches 8, then changes from 1 to 0 when the count resets to zero. That's the right time for the next digit to increment.

    What BobK said.
     
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

-