I've built my own version of 8-bit computer based on various examples in the Internet. Once built I started to face some issue with unpredictable memory changes when it was not supposed to. After I'd spent couple of days debugging I found out that the problem was caused by a chip implementing combination logic. An output of the chip was switching from 1 to 0 unpredictably with no particular rule. Ensuing digging helped me to realize that the problem could be caused by the schematics of one of the inputs. (See the picture). Once I removed the LED,I let the schema work for a couple of hours and it worked with no issues.
I wanted the input of the HCT10N to be either 1 or 0 based on the switch position and LED to indicate the mode of the schema.

enter image description here

Question: Does it mean that actually I can't pull down the IC input through LED? Looks like I can't 'cause LED drops up to 2V and CMOS logic can treat it as a logical 1. Thanks a lot!

  • \$\begingroup\$ Correct. You cannot because the capacitance at the NAND input cannot drain below \$ V_{LED} \$. \$\endgroup\$
    – DKNguyen
    Oct 21, 2019 at 21:39
  • 5
    \$\begingroup\$ You can get around the problem by having a second resistor in parallel with the LED/series resistor. That won't be affected by the LED forward voltage. \$\endgroup\$
    – Finbarr
    Oct 21, 2019 at 21:40
  • \$\begingroup\$ Thanks! If I connect extra resistor in parallel it means that the voltage on it and LED/resistor will be the same, doesn't it? \$\endgroup\$ Oct 21, 2019 at 21:51
  • \$\begingroup\$ For driving LEDs (in the "early days" anyway), we used the 7489 (which predates the 74189.) The 7489 is open-collector and can sink 16 mA. Since it is a NAND a "1" supplied to its input can be inverted to a "0", which pulls down. If you hook an LED up to that and towards Vcc (with a resistor of course), then a "1" at the input will cause the LED to "turn on." So it reflects the input without loading the input much. It's how we used to do "front panels" for our hand-built, wire-wrapped (in my case) computers when all we had was 7400 series devices to work with. I always buffered LED displays. \$\endgroup\$
    – jonk
    Oct 21, 2019 at 21:51
  • \$\begingroup\$ @AndrewBolotov Sure does and since the diode is the one which is able to force the voltage across itself, the resistor will end up matching the diode's voltage. Since the top resistor will have the same voltage as it did before due to the diode's forcing action, then the same current flows through it as before, but now some of it gets diverted from the LED to the parallel resistor so your LED will be dimmer unless you adjust the top resistor to accommodate for it. \$\endgroup\$
    – DKNguyen
    Oct 21, 2019 at 21:59

1 Answer 1


Although LEDs are mainly used to generate light based on an electrical stimulus, the reciprocal is also true. Referring to the original schematic, when the switch is open, the anode of the LED is connected to a high impedance input. When the LED is exposed to light, it can generate a voltage across it. Not sure if this is what you are seeing, but certainly can be a potential issue.

As mentioned, adding a resistor in parallel with the LED also gives a path to ground to shunt current from the LED when switch is open, but coming up with a value that works under all conditions may be difficult since there are unknowns. To make it full proof, you can add a buffer between the logic gate input and the LED.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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