Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Tying to ground/5V, via resistor?

Status
Not open for further replies.

edeca

Active Member
Apologies for the basic questions. I've been working through the "how to use intelligent LCDs" tutorials. In this they suggest a few things that I don't understand the theory behind. I'm using the LCD as an example but I get the feeling this is something which is probably the same on any logic device.

For data pins left unused, it suggests leaving them floating. How does this differ from tying directly to one of the power rails via a resistor? And why shouldn't pins be connected directly to ground unless R/W is also tied to ground?

For pins which are tied high (with a switch to bring them low) a 4.7k resistor is used. Why is this? Is there a reason the pins cannot be connected straight to 5V? And what does a uC do differently that allows connection straight to the pin?

If the reason for this is current limiting, I guess I need to read up on the theory. If anybody can point me to suitable entry level reading I'll happily digest..!
 
Some logic families will cause unused inputs to float to a logical 1. Others do not. If the state of the unused pin does not change the operation of the device (should not if it is unused) then the pin can be left unconnected. But, it is best to have logic input at logic 0 or 1. If the voltage is in between they can put transistors into an analog state where they use more power.

In digital circuits resistors are often used as current limiting devices. In the case of an input tied to +5 we must use a resistor with the switch to ground. If not the switch would cause a short circuit. The resistor allows the line to go to ground but limits the current. This is a good place to use Ohm's law to determine how much current flows using various resistor sizes.

One thing that people have trouble with is when an input is connected to +5 or gnd through a resistor. The logic thing to do is to find the voltage at the pin after the voltage drop due to the resistor. That is wrong. The input does not allow the current to flow so the voltage is the same on both sides of the resistor. Just as it is for a resistor connected to +5 on one side and left unconnected on the other.

HTH
 
Last edited:
Thanks 3v0. I found this and read it, all of my questions are now answered.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top