Switch
A switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. A switch may be directly manipulated by a human as a control signal to a system, or to control power flow in a circuit.
Pull-up switching:
Pull-up switches are switches used in logic circuits to ensure a well-defined logical level at a pin under all conditions. As a reminder, digital logic circuits have three logic states: high, low and floating (or high impedance). The high-impedance state occurs when the pin is not pulled to a high or low logic level, but is left “floating” instead. A good illustration of this is an unconnected input pin of a microcontroller. It is neither in a high or low logic state, and a microcontroller might unpredictably interpret the input value as either a logical high or logical low. Pull-up switches are used to solve the dilemma for the microcontroller by pulling the value to a logical high state, as seen in the figure. If there weren’t for the pull-up switche, the MCU’s input would be floating when the switch is open and brought down only when the switch is closed.
Pull Down Switching:
Pull-down switches work in the same manner as pull-up switches, except that they pull the pin to a logical low value. They are connected between ground and the appropriate pin on a device. An example of a pull-down switche in a digital circuit can be seen in the figure. A pushbutton switch is connected between the supply voltage and a microcontroller pin. In such a circuit, when the switch is closed, the micro-controller input is at a logical high value, but when the switch is open, the pull-down switche pulls the input voltage down to ground (logical zero value), preventing an undefined state at the input. The pull-down switche must have a larger resistance than the impedance of the logic circuit, or else it might be able to pull the voltage down by too much and the input voltage at the pin would remain at a constant logical low value – regardless of the switch position.
No comments:
Post a Comment