8/16/2023 0 Comments Pull the pin challenge level 15![]() But, look carefully, It is not actually getting shorted. However, as we stated that the pin cannot be directly shorted to the ground or Vcc as this will eventually make the circuit damaged due to short circuit condition, but in this case, it is again getting shorted to the ground using the closed switch. So, when the switch is not being pressed, the logical input pin has always a default voltage of 5V or the pin is always High until the switch is pressed and the pin is shorted to ground making it logic Low. It is connected with the logic voltage from the supply source of 5V. The R1 resistor is acting as a pull-up resistor. The digital logic input pin P0.5 can be toggled from logic 1 or High to the logic 0 or Low using the switch SW1. If we need the high state as default and want to change the state to Low by some external interaction we can use the Pull-up resistor like the image below. Suppose, we need a default logic state and want to change the state by some interaction or external peripherals, we use a pull-up or pull-down resistors. Where and How to use Pull-up and Pull-down resistorsīy referencing the above microcontroller image, where the digital logic pins are shorted with the ground and VCC, we could change the connection using pull-up and pull-down resistors. At the same time both resistors, pull-down and pull-up resistors hold the digital state either Low or High. ![]() A pull-up resistor allow controlled current flow from supply voltage source to the digital input pins, where the pull-down resistors could effectively control current flow from digital pins to the ground. To control the current flow, we need those pull-down or pull up resistors. As direct connection eventually increase current flow just like the short circuit and could damage the sensitive logic circuit which is not advisable. As digital circuit works in low current, connecting the logic pins directly to the supply voltage or the ground is not a good choice. Now, if we replace the High and Low value with the actual voltage value then the High will be the logic level HIGH (lets say 5V) and Low will be the ground or 0v.Ī Pull-up resistor is used to make the default state of the digital pin as High or to the logic level (in the above image it is 5V) and a Pull-Down resistor does exactly opposite, it makes the default state of the digital pin as Low (0V).īut why we need those resistors instead we could connect the digital logic pins directly to the Logic level voltage or with the ground like the below image? So, in each case, the state gets changed as shown below. In both cases, we need to make the digital pin either ‘ High’ or ‘ Low’ but it cannot be left floating. In either case, we need to hold the digital pin either 0 and then change the state to 1 or we need to hold it 0 and then change to 1. In some cases, we need to change the state from 0 to 1 or from 1 to 0. If we consider a digital circuit, the pins are always be either 0 or 1. What are Pull-up and Pull-Down Resistor and Why we need them? Resistance is measured in Ohm with a sign of Ω. There are many different types of resistors. It is a passive component which provides resistance when current flow through it. Resistors are current limiting devices with are used abundantly in electronics circuits and products.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |