Thank you all, I take resistors as 10k and Vcc is 9V and it works. By the way does Led needs resistor like 220ohm?When you’re using switches, some of the gate inputs are ‘floating’. That means, when the switch is open, the input is indeterminate. Neither high nor low consistently. In the simulation, this state isn’t represented and they let you get away with it. You need a better simulator.
in real life, each input to a CMOS gate must either be a high or low signal. To make sure this happens, you need a pull-down or pull-up resistor, depending on the input to the switch.
I’m going to assume that you’re switching Vcc to the gate. When the switch is open, you’ll need a pull-down resistor. A 4.7kΩ resistor should work, or even as much as 10kΩ. Connect it from the switch contact that goes to the gate input and to circuit ground.
This, when the switch is closed, Vcc is input to the gate. There isn’t a short because of the resistor. The gate sees a high input. When the switch is open, the gate input connects to circuit ground through the resistor and the gate sees a low input.
Assuming I’m not using TTL gates...I recall using pull up or pull down resistors for most of the circuits I have built.
/Edit
Coming way too late to the party.
Edit/
Probably, but you need to do some calculations to determine the actual resistor value.Thank you all, I take resistors as 10k and Vcc is 9V and it works. By the way does Led needs resistor like 220ohm?
We don't know. You have to be more specific.By the way does Led needs resistor like 220ohm?
You can't expect any logic gate to have a valid logic level if you put an LED to ground on the output.By the way does Led needs resistor like 220ohm?
I would use CD4000 series CMOS logic gates, along with a transistor buffer, (e.g. 2N7000)) to drive the LED.Do you know any IC which is similiar to the circuit i attach on the post? I was thinking about using transistors to make gates but i guess it's better to use ic.
um you mean the circuit on the simulation works without led driver like transistor or mosfet but in real i should use it? i thought it's okay just to get wire from gate output and connect to led directlyI would use CD4000 series CMOS logic gates, along with a transistor buffer, (e.g. 2N7000)) to drive the LED.
That's fine in simulation, but may damage a gate in real life. Check the datasheet for the safe output current of the gates you are using. Simulation models generally don't impose any current limits.i thought it's okay just to get wire from gate output and connect to led directly
As Alec noted, simulations generally don't pay attention to limits.i thought it's okay just to get wire from gate output and connect to led directly
Your simulation software does not know the maximum allowed dissipation of the gate output.i thought it's okay just to get wire from gate output and connect to led directly
by Jake Hertz
by Aaron Carman
by Aaron Carman