• Pull-up resistors


    1  Introduction

      Pull-up resistors are very common in microcontrollers or any digital logic device. 

      

      With a pull-up resistor, the input pin will read a high state when the button is not pressed. When the button is pressed, it connects the

    input pin directly to ground.

      Keep in mind, if the resistor wasn’t there, your button would connect VCC to ground, which is very bad and is also known as a short.

      A low resistor value is called a strong pull-up (more current flows), a high resistor value is called a weak pull-up (less current flows). Usually

    we use a resistor value of 10kΩ for the pull-up.

    2  Conditions

      The value of the pull-up resistor needs to satisfy two conditions:

      1)  When the button is pressed, the input pin is pulled low. The value of R1 controls how much current will flow from VCC to ground.

      2)  When the button is not pressed, the input pin is pulled high. The value of R1 controls the voltage on the input pin.

      

      For condition 1, we do not want R1 is too low. However, for condition 2, R1 should not be too large. The general rule is to use R1 that is 1/10 less than the input impedance(R2). Usually a input pin on a microcontroler has an impedance that can vary from 100k to 1MΩ.

    3  Calculating

      Assume we want to limit the current to 1mA when the button is pressed, where Vcc = 5V. What resistor value should we use?

      It is easy to show how to calculate the pull-up resistor using Ohm’s Law:

        R1 = Vcc/I = 5V/1mA = 5KΩ

      Another thing is that the larger the pull-up resistance, the slower the pin is to respond to voltage changes.

  • 相关阅读:
    使用PuTTY时的文件上传下载方法
    [emacs org-mode小技巧] org-indent-mode 让文档更容易阅读
    tldr 的安卓客户端
    如何配置ssh免密码登录
    降低屏幕亮度,减缓眼疲劳 (linux/windows/firefox/android)
    Android上面安装Linux的方法
    Spring中argNames的含义
    js 输出 select 的值
    js 优先级
    layer.confirm( 找不到 on函数
  • 原文地址:https://www.cnblogs.com/mengdie/p/4579024.html
Copyright © 2020-2023  润新知