74191 counter

Discussion in 'Homework Help' started by lord.hippo, Mar 19, 2013.

  1. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    Hello

    Need help for Counter circuit. Basically, I would like to start count with pressing of push bottom switch. and stop and hold the output by pressing same switch again. And press to restart counting and so on.. Currently I am using 74LS191 for counter. From data sheet, what i understand is to control by using LOAD and EN pin.

    currently i am using push button switch to generate pulse for LOAD pin and same pulse connect to JK Flip Flop(toggle mode) to generate 1 and 0 for EN pin. For counting is working ok, but when press switch again, it reset everything and count again.

    How to make it for LOAD pin(not to receive signal) when press 2nd time and just toggle for enable pin to stop and hold? I tried to make use of 2 input- NAND gate(input 1: JK FF output Q, input2 : switch ouput) before connect to LOAD pin but it still resetting the count. Kindly plz advice..
     
  2. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Welcome to AAC.

    Please post a schematic of your circuit. We can better help once we see your circuit.
     
  3. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    [​IMG]

    Hello, here is my design. Sorry about hand drawing. Hope you can see..
    For design 1 as mentioned above. Output always reset when press push button.
    Design 2 making use of max/ min to control. For 2nd design
    1) press switch to start count.
    2) press switch again stop counting and hold the value at output. But when press again it can only continue from stop value count.

    What I really want is
    1) press PB to start count.
    2) press PB to stop and hold count value at output
    3) press PB to restart counting from 0
    And so on...
     
  4. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    I cannot see any schematic that you posted.:(

    If I were to design it, I would have used 2 push buttons - one for EN and one for PL. But if I must use one button, I would use 2 JK F/F to get 3 states 01,10 & 11 to do start, stop and restart functions.

    May be there are simpler way but that's what popped up on my head.:D

    Allen
     
    Last edited: Mar 19, 2013
  5. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
  6. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
  7. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    Resend my schematic. Sadly, I need to use only 1 push button switch. I m not clear about load input signal. Is it suppose to be pulse signal or toogle 1/0 will work?
     
  8. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    I attached your circuit here..

    Did you try simulating it in multisim or proteus ISIS? Did you read the datasheet of 74191?

    Allen
     
    Last edited: Mar 19, 2013
    lord.hippo likes this.
  9. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    No. I wire it on breadboard and tried. Input preset state 0000. Up count and output connect to LED.
     
  10. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    Clk input from 555timer and 1 Hz
     
  11. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I'm not sure what you mean by max/min. The hand drawing is fine, but in the future please label the pin numbers of the ICs. Sometimes different datasheets refer to same pin number as different names. The datasheet I referenced didn't use the names you wrote out, so it took a few minutes to decipher.

    This is tricky because you need some interesting timing to make everything work as desired.

    I've attached a timing diagram showing you what I believe it is you're trying to do.

    First button press: parallel load is pulled high and the clock enable is pulled low and the counter counts.

    Second button press: clock enable is pulled high and counter stops

    Third button press: parallel load is pulled low

    Repeat

    I would guess there are a number of ways to tackle this. One thought I had was to use a second 74LS191 and connect the outputs to clock enable and parallel load. You'll have to figure out how to do this of course, but it can work. You'd then have to reset the second 74LS191 after the third button press.

    As an aside, there is the question of how to set the circuit to 0 at power-up, otherwise you'll get a random number. You can add a resistor and capacitor to the parallel load input - look at the section entitled Power-on reset trigger here.
     
    lord.hippo likes this.
  12. lord.hippo

    Thread Starter New Member

    Apr 29, 2009
    8
    0
    sorry about the confusion sir, I will take note.

    For using of a second 74LS191 and connect the outputs to clock enable and parallel load. Do you mean output(QdQcQbQa >pin 2,3,6,7) of first 74LS191 to second clock enable and parallel load or is the other way around?
     
  13. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I was thinking you can connect the outputs (Qa-Qd) of the second 74LS191 to the clock enable and parallel load inputs of the first 74LS191. You really only need Qa and Qb. Your single button would be connected to the clock input of both 74LS191's. So, when you press the button, the outputs of the second 74LS191 will change the clock enable and parallel load inputs to the first 74LS191.

    I suggest writing out the output of the 74LS191 in columns. Example, when counting up, the first clock pulse will cause output to be 0000, second pulse will output 0001, and so on.

    Once that is done, take a look at the timing diagram I posted then see how you can use two of the outputs to create the same timing effect.

    Some hints:
    *Look at Qa and Qb
    *Determine whether it is better to have the second 74LS191 count up or down
    *Consider using other logic gates with the outputs of the second 74LS191 to match the timing diagram
     
Loading...