# Should resistors go at Vcc and Inputs of logic IC's to limit current ?

#### Kjeldgaard

Joined Apr 7, 2016
476
After a little searching, I managed to find an old data sheet of a simple non buffered inverter, wherein there is shown equivalent circuit: 74HCU04. Each of the six inverters looks like the following:

There are diodes from the inputs and outputs to Vcc and Gnd, and only when the voltage at the input rises above Vcc or goes below Gnd, the leak current (besides Input leakage current, which is typically a small uA value) in the protection diodes. Data on the CMOS logic is usually between 10 and 20 mA as max-current clamp.

When we're talking about, not used, CMOS logic inputs must be tethered to Vcc or Gnd, then it's to keep the cross currents down. The following graph shows the relationship between the input voltage, cross current and output voltage:

It can be seen that with about half an Vcc input voltage, then current is typically over 20 mA, and input should be within a half volts from Gnd or Vcc before this cross-current is minimized.

#### PauloConstantino

Joined Jun 23, 2016
266
Current can go anywhere. Current can go to GND. Current can go to Vcc.

CMOS inputs have protection diodes.
One diode is from the input pin to Vcc. If the input voltage exceeds Vcc + Vdiode, the current goes to Vcc.

Another diode goes from GND to the input pin.
If the input voltage goes more negative than -Vdiode, the negative current goes to GND.

Thank you for your kind replies.

Just one thing, I dont understand the need for a diode going from GND pin to the input pin...

if the voltage at the input happens to become more negative than what? -VDiode ? What current goes to GND? If the voltage at the input goes negative, and there is a diode from GND to input, how can current go to GND ? Positive current cannot go to GND, ok. By negative current what do you mean ? I think you mean that current from GND flows to the input, but the "Negative" of that goes to GND. Just like a current flowing from the positive end of a battery going from it to the negative end is the same as saying that negative current goes from the negative end to the positive end.

Is that what you meant buddy ? But in that case,why would you want current flowing into the input ?

#### MrChips

Joined Oct 2, 2009
31,091
Thank you for your kind replies.

Just one thing, I dont understand the need for a diode going from GND pin to the input pin...

if the voltage at the input happens to become more negative than what? -VDiode ? What current goes to GND? If the voltage at the input goes negative, and there is a diode from GND to input, how can current go to GND ? Positive current cannot go to GND, ok. By negative current what do you mean ? I think you mean that current from GND flows to the input, but the "Negative" of that goes to GND. Just like a current flowing from the positive end of a battery going from it to the negative end is the same as saying that negative current goes from the negative end to the positive end.

Is that what you meant buddy ? But in that case,why would you want current flowing into the input ?
You really don't want any significant current flowing. Too much current destroys the gate.

What you want to do is prevent the voltage at the input pin from exceeding the limits.

Ideally, you want the voltage at the input pin to stay within the range of Vcc and GND.

The best we can do with two diodes is to limit the range to Vcc + Vdiode and GND - Vdiode.

Thus when the input voltage goes outside of this range, the diode becomes forward bias and the input voltage does not go higher than Vcc + Vdiode or lower than -Vdiode, thus protecting the input gate structure from damaging high voltages, positive voltage and negative voltage,

#### PauloConstantino

Joined Jun 23, 2016
266
You really don't want any significant current flowing. Too much current destroys the gate.

What you want to do is prevent the voltage at the input pin from exceeding the limits.

Ideally, you want the voltage at the input pin to stay within the range of Vcc and GND.

The best we can do with two diodes is to limit the range to Vcc + Vdiode and GND - Vdiode.

Thus when the input voltage goes outside of this range, the diode becomes forward bias and the input voltage does not go higher than Vcc + Vdiode or lower than -Vdiode, thus protecting the input gate structure from damaging high voltages, positive voltage and negative voltage,

That's perfect! Can't thank you enough for the explanations. It's clear now. I'm designing a CPU from scratch using logic gates, and even though I can design and and imagine how to build it, the technicalities of these chips are not known to me and they bug me down!

Hopefully now I will be able to continue!

Best wishes

Paulo

#### PauloConstantino

Joined Jun 23, 2016
266
After a little searching, I managed to find an old data sheet of a simple non buffered inverter, wherein there is shown equivalent circuit: 74HCU04. Each of the six inverters looks like the following:
View attachment 110984
There are diodes from the inputs and outputs to Vcc and Gnd, and only when the voltage at the input rises above Vcc or goes below Gnd, the leak current (besides Input leakage current, which is typically a small uA value) in the protection diodes. Data on the CMOS logic is usually between 10 and 20 mA as max-current clamp.

When we're talking about, not used, CMOS logic inputs must be tethered to Vcc or Gnd, then it's to keep the cross currents down. The following graph shows the relationship between the input voltage, cross current and output voltage:
View attachment 110985
It can be seen that with about half an Vcc input voltage, then current is typically over 20 mA, and input should be within a half volts from Gnd or Vcc before this cross-current is minimized.

Thank you for this. However I think there's some communication problems here. Did you say that the voltage at the input pins should be halfway between the voltage at the chip's Vcc in order to the astray floating pin currents are minimized? And that above halfway, current is above 20mA? What current?

#### PauloConstantino

Joined Jun 23, 2016
266
Dear friends, may I ask you another question?

I know that I need to attach some decoupling capacitors close to the power pins on my IC's. I am using simple breadboards. Should I take these ceramic capacitors and attach them right at the power rails of my breadboard, one leg on the (+) rail, another directly on the (-)? The capacitor's legs would be in line with the line from the IC's Vcc. Also maybe another one with one leg right to the IC's GND leg, and another leg to the (+) line ?

#### MrChips

Joined Oct 2, 2009
31,091
Thank you for this. However I think there's some communication problems here. Did you say that the voltage at the input pins should be halfway between the voltage at the chip's Vcc in order to the astray floating pin currents are minimized? And that above halfway, current is above 20mA? What current?
No.

One of the reasons we must connect unused inputs to logic HIGH or logic LOW is because we DO NOT want the input to float to half-way between Vcc and GND. When this happens, the current consumption of the internal transistor structure (not the input gates of the MOSFET) goes way up. The current we're referring to is the supply current, not the gate input current.

Read again what member Kjeldgaard says in post #21.
Ideally, we want a logic HIGH input to be between Vcc -0.5V and Vcc.
Ideally, we want a logic LOW input to be between GND and +0.5V.

#### MrChips

Joined Oct 2, 2009
31,091
Dear friends, may I ask you another question?

I know that I need to attach some decoupling capacitors close to the power pins on my IC's. I am using simple breadboards. Should I take these ceramic capacitors and attach them right at the power rails of my breadboard, one leg on the (+) rail, another directly on the (-)? The capacitor's legs would be in line with the line from the IC's Vcc. Also maybe another one with one leg right to the IC's GND leg, and another leg to the (+) line ?
If you are simply testing a circuit on a breadboard you may omit the capacitors.
The reason here is that it is not possible to layout your breadboard with short enough leads on the capacitors to make them effective.

If you are designing a printed circuit board (PCB), yes, by all means, install the decoupling capacitors using recommended layout guidelines.

While on the same topic, avoid using a standard 555-timer chip. Use the CMOS version instead, LMC555 or TLC555.

#### PauloConstantino

Joined Jun 23, 2016
266
If you are simply testing a circuit on a breadboard you may omit the capacitors.
The reason here is that it is not possible to layout your breadboard with short enough leads on the capacitors to make them effective.

If you are designing a printed circuit board (PCB), yes, by all means, install the decoupling capacitors using recommended layout guidelines.

While on the same topic, avoid using a standard 555-timer chip. Use the CMOS version instead, LMC555 or TLC555.
Wait! I am planning to design the whole CPU using a breadboard! It will be one big breadboarded CPU. Will my chips fail ??

#### PauloConstantino

Joined Jun 23, 2016
266
Of course when it works, I will transfer it into a PCB, but for a LONG while it will be all on lots of breadboards. Is this a bad idea?

#### Alec_t

Joined Sep 17, 2013
14,413
I'm designing a CPU from scratch using logic gates, and even though I can design and and imagine how to build it, the technicalities of these chips are not known to me and they bug me down!
Bug you down or not, it is important to research and understand the operation of all chips you propose to use; otherwise the chances of achieving a successful design are very slim. Obtain and study the datasheets of all the chips.

#### MrChips

Joined Oct 2, 2009
31,091
Of course when it works, I will transfer it into a PCB, but for a LONG while it will be all on lots of breadboards. Is this a bad idea?
What chips are you planning on using?
What will be the clock frequency of your CPU?
How big is this breadboard going to be?
How much current do you anticipate your total circuit will require?

Answer these questions and you will be a long way ahead in determining if your circuit is going to work.

For starters, I would suggest you don't use a solderless breadboard.
Wirewrap techniques or 3M solderless breadboarding (though expensive) would be better.

#### PauloConstantino

Joined Jun 23, 2016
266
Bug you down or not, it is important to research and understand the operation of all chips you propose to use; otherwise the chances of achieving a successful design are very slim. Obtain and study the datasheets of all the chips.
I have been doing so. Thank you sir! Can you please have a look at my latest question? using breadboards to layout the CPU................ I am afraid these cheap breadboards might add too much in ductance or
What chips are you planning on using?
What will be the clock frequency of your CPU?
How big is this breadboard going to be?
How much current do you anticipate your total circuit will require?

Answer these questions and you will be a long way ahead in determining if your circuit is going to work.

For starters, I would suggest you don't use a solderless breadboard.
Wirewrap techniques or 3M solderless breadboarding (though expensive) would be better.

Hmmm solderless is what I'm using. I will look up these other techniques. Why in particular should I not use solderless boards?

Thank you!

#### MrChips

Joined Oct 2, 2009
31,091
That's perfect! Can't thank you enough for the explanations. It's clear now. I'm designing a CPU from scratch using logic gates, and even though I can design and and imagine how to build it, the technicalities of these chips are not known to me and they bug me down!

Hopefully now I will be able to continue!

Best wishes

Paulo
Have you laid out the specifications and design of your CPU?
How much time do you have?
This is a very ambitious project.
I give you twenty years and you will have a mess of a breadboard and nothing working. This will be an uncompleted project.

My lab partner and I built a 4-bit computer on a breadboard as a term project using 7400 gates back in 1973.
I moved on to building systems using 1802, 8008, 6502, 6800, 6802, 6805, 6809, 68000, 68008, 8085, 8088, 8086, Z80, Atmel AVR, PIC, HC11, 9S08, MSP430, DSP56F807 and STM32F407 ARM chips.

You really need to move up the ladder.

#### dl324

Joined Mar 30, 2015
17,146
for a LONG while it will be all on lots of breadboards. Is this a bad idea?
If you're referring to solderless breadboards, it's probably a bad idea. In addition to the stray capacitance, you have the issue of wires becoming dislodged which will be a debugging nightmare.

I knew a guy who breadboarded the 80286 microprocessor because doing that was faster than trying to simulate the hardware (tools weren't up to the task back then).

#### PauloConstantino

Joined Jun 23, 2016
266
Have you laid out the specifications and design of your CPU?
How much time do you have?
This is a very ambitious project.
I give you twenty years and you will have a mess of a breadboard and nothing working. This will be an uncompleted project.

My lab partner and I built a 4-bit computer on a breadboard as a term project using 7400 gates back in 1973.
I moved on to building systems using 1802, 8008, 6502, 6800, 6802, 6805, 6809, 68000, 68008, 8085, 8088, 8086, Z80, Atmel AVR, PIC, HC11, 9S08, MSP430, DSP56F807 and STM32F407 ARM chips.

You really need to move up the ladder.

I don't know what you're on about. I can build this CPU in 1 month. Not only that, it's a 16bit CPU. I am a computer scientist. The only thing that might prevent me are some technicalities about electronics since I don't have much experience with electronics but this can be overcome.

I get really angry at comments like yours. I "start " with whatever I want to start with. You don't even know me, don't underestimate people you don't know.

A CPU is just a finite state machine. I have it all worked out.

Last edited:

#### hp1729

Joined Nov 23, 2015
2,304
You should never use a resistor on the Vcc or GND pins. Connect them directly to the power supply. Inputs which are routed to external circuits can sometimes use resistors to limit input current, or you can use another kind of interface device besides CMOS. If teh input to a chip is connected to another chip on the same board then using resistors to limit current is not required.
"Should never use a resistor ..." on unused pins, yes.
Yes resistors for pull-up and pull-down resistors. Calculations for them? Check typical currents and voltage requirements for the family in question. For CMOS or 74HC about 50K to 100K is good.

#### Alec_t

Joined Sep 17, 2013
14,413
I have it all worked out.
I admire your confidence. Have you taken propagation delays and signal rise/fall times into account? Those are all affected by circuit layout. Stray capacitances and straggly wire inductances associated with solderless breadboards won't be accurately predictable and will work against you.

#### KeepItSimpleStupid

Joined Mar 4, 2014
5,088
Hey, I built a CPU too as part of a course with two other partners. It was what we decided to do for our project. Late 70's. It wasn't particular fast, but it could sort numbers in ascending or decending order depending on the microcode that we devised. The code space as 16 words x 16 bits and the data space 16 x 4 bits. Breadboarded. We each took a section: memory, the microcoded instructions, and the program counter (me).