This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN74HCS74: CLR and PRESET

Part Number: SN74HCS74
Other Parts Discussed in Thread: SN74HCS02, SN74LVC1G02, SN74HCS04, SN74LVC1G04

Hi,

Good day.

Our customer has this question regarding the SN74HCS74:

The function table shows that if the CLR and PRESET pins are both active, both outputs will have a HIGH state
Datasheet says this condition is unstable, does that mean as soon as the state of one input changes it will go back to operating normally?
To be more specific, the preset pin will be held low, and I want the Q bar output to basically invert the signal at the reset input.
which is a normally high signal that momentary swings low at the end of every period
I want to understand this unstable condition mentioned in the datasheet
it says when both CLR and PRESET inputs are active (low), the output of both Q and Q bar is high So I want to have PRESET input tied to ground, and have the Q bar output basically invert the signal at the CLR input.
It should effectively act like a NOR gate right? a nor gate outputs a low for every condition except both inputs low
I just need to know if the flip flop will go back to behaving normally as soon as the CLR input is inactive


Thank you for your help.


Regards,

Cedrick

  • Hi Cedrick,

    They are referring to this table in the datasheet:

    The function table shows that if the CLR and PRESET pins are both active, both outputs will have a HIGH state

    That is correct. Both Q and Q\ will be HIGH when CLR\ and PRE\ are held LOW at the same time.

    Datasheet says this condition is unstable, does that mean as soon as the state of one input changes it will go back to operating normally?

    It means that the outputs will not hold in the HIGH state for both after the CLR\ and PRE\ inputs are reverted back to the HIGH state.

    When both are released simultaneously, the output state will be unknown, but one output will be the inverse of the other.

    To be more specific, the preset pin will be held low, and I want the Q bar output to basically invert the signal at the reset input.
    which is a normally high signal that momentary swings low at the end of every period

    With the PRE\ pin held low, the Q output will be forced into the HIGH state and the Q\ output will be forced into the low state. Driving CLR\ LOW will cause the Q\ output to also go HIGH. When CLR\ is released, Q\ will go LOW again.

    It should effectively act like a NOR gate right? a nor gate outputs a low for every condition except both inputs low

    No - with the PRE\ input permanently grounded, the device can either output Q = HIGH and Q\ = LOW, or it can output Q=HIGH and Q\ = HIGH, depending on the state of the CLR\ pin only. In other words, the Q output is just HIGH -- it has no logic function any longer, and the Q\ output is an inverter with CLR\ as the input.

    If you would like a NOR gate function, the SN74HCS02 is a good choice - or the SN74LVC1G02.

    it says when both CLR and PRESET inputs are active (low), the output of both Q and Q bar is high So I want to have PRESET input tied to ground, and have the Q bar output basically invert the signal at the CLR input.

    By doing this, you will have effectively turned the device into an inverter. Is there a reason you don't want to just use an inverter like SN74HCS04 or SN74LVC1G04?

    I just need to know if the flip flop will go back to behaving normally as soon as the CLR input is inactive

    Yes, it will behave normally when the CLR\ input is taken back to HIGH. That is to say, if PRE\ is LOW, the outputs will be forced into the "preset" states. If PRE\ is also changed to HIGH, then the device will act like a D-type flip-flop again, with the outputs holding the last known state. The only state that the device will not hold at the outputs is the "Q = HIGH, Q\ = HIGH" state, which is why there is a footnote in the function table regarding this.

  • Hi Emrys,

    Good day. Thank you for your help.

    I've got  a feedback from our customer.

    The circuit will be generating one-shots most of the time, but I'm including a switch that turns the circuit into an oscillator. This is necessary for calibration, and being able to invert the CLR input via the Qbar output means that I won't have to include extra parts that are only used for setup. The only other question I have is what you meant by releasing both asynchronous inputs at the same time? I guess which was active last will determine the output states?

    Regards,

    Cedrick

  • what you meant by releasing both asynchronous inputs at the same time? I guess which was active last will determine the output states?

    In the event that CLR\ and PRE\ are both LOW, and they are both changed to HIGH at the same time, then there is no way to know which state will remain at the output. The solution here is to just not do that.

    You are correct that the last one active will determine the state, so if you intentionally release PRE\ first, then CLR\, then the output will be in the LOW state (Q = LOW, Q\ = HIGH).