0
\$\begingroup\$

The chip I'm using is the CD4013BE. datasheet: http://www.ti.com/lit/ds/symlink/cd4013b.pdf

I'm trying to make a flip flop using this circuit to store 1 bit of information. The datasheet says Q1 (with the line over it) is supposed to be the inverse of Q1. But whenever I hook up the circuit they are always both on. I've experimented with using all the others pins too, sometimes I can get the brightness to vary across the leds but they are both always on. I can never get it so 1 is on and the other is off. Is my IC broken? If not how can I fix this circuit.

The circuit images: enter image description here enter image description here enter image description here

And finally my horribly crude circuit diagram: enter image description here

So why are both leds always on? I thought they were supposed to be inverses of eachother?

\$\endgroup\$
  • \$\begingroup\$ Put 1k0 pull down resistors on pins 3,4,5 and 6. \$\endgroup\$ – JIm Dearden Jan 27 '17 at 18:51
  • \$\begingroup\$ @JImDearden Thanks, connecting 3&4 and 5&6 together? Or from 3v to pin 3, 3v to pin 4, etc? (Sorry if these are really dumb questions, I have 0 ee knowledge) \$\endgroup\$ – Keatinge Jan 27 '17 at 18:52
  • \$\begingroup\$ @JImDearden Also is it okay if I use a 10k resistor? I only have 10k, 220, and 10 ohm resistors? \$\endgroup\$ – Keatinge Jan 27 '17 at 18:53
  • 3
    \$\begingroup\$ See page 10 of the datasheet. If Set=Reset=1, then Q=Q`=1 \$\endgroup\$ – Tom Carpenter Jan 27 '17 at 18:54
  • \$\begingroup\$ 4 separate resistors and 10k is fine, it just needs to put a low on the set, reset pins etc. \$\endgroup\$ – JIm Dearden Jan 27 '17 at 18:54
6
\$\begingroup\$

If you refer to the truth table on Page 10 of the datasheet (section 7.4), the answer to your question is simply, no, it's almost certainly not broken.

Truth Table

Notice that when Set and Reset are both high, then both Q and Q` are also high, therefore both outputs being high is not on its own an indicator of being "broken".

When left floating, the value of a 4000 series logic IC input is in a completely unknown state. It may represent a high value, or it may represent a low value. The protection circuitry on the input will pull it to somewhere mid-supply due to reverse leakage currents in the clamping diodes.

In your case it is likely representing a high level as without any other evidence this would account for the behaviour you are seeing.

\$\endgroup\$
4
\$\begingroup\$

Review table 1 on pg 10. Both Q and !Q will be high if reset and set are both high. You likely need to pull these pins low before the chip will operate as you expect.

\$\endgroup\$
  • \$\begingroup\$ Hmm, going to test this now. I assumed having no connection would be the same thing as low? I guess 0v doesn't count as low? \$\endgroup\$ – Keatinge Jan 27 '17 at 18:56
  • 4
    \$\begingroup\$ @Keatinge The catch is that "no connection" doesn't equal "0 V" \$\endgroup\$ – W5VO Jan 27 '17 at 19:04
  • \$\begingroup\$ @Keatinge : Voltage is always relative. Thus, if you connect a pin to low, it is 0v relative to the low side of your power supply. If you don' t connect it, it is 0v relative to the unknown, which may be equal to your power supply's high, or relative to the high voltage power lines running somewhere nearby, etc. \$\endgroup\$ – Extrarius Jan 27 '17 at 19:05
  • 1
    \$\begingroup\$ @Keatinge putting a resistor to +ve (high) would not help you. It would simply guarantee the condition that causes both outputs to be high. Now putting the resistor between input and 0 (low) would remove that condition. \$\endgroup\$ – Tom Carpenter Jan 27 '17 at 19:07
  • 1
    \$\begingroup\$ @Keatinge 0V that was supposed to say. i.e. GND \$\endgroup\$ – Tom Carpenter Jan 27 '17 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.