Input programming activity


Posted on Feb 6, 2014

Now, let`s re-examine the function of the TRIS registers. The TRISA and TRISB registers control the direction of data transfer on each pin of Port A and Port B, respectively. The easy way to remember the TRIS register settings is to match the numbers 0 and 1 to the letters O and I: The CHRP circuit board includes a number of input circuits, such a


Input programming activity
Click here to download the full size of the above Circuit.

s pushbutton switches, phototransistors (light sensors), and a potentiometer (position sensor). All of these inputs operate in a similar, though slightly different way. Examine the switch input schematic diagram, below: The switch (S1) and pull-up resistor (R1) form a series circuit, also known as a voltage divider. The microcontroller input is connected to the output at the mid-point of the voltage divider, and senses the electrical potential across the switch. Since any microcontroller pins configured as inputs have a high impedance, they will just sense the externally applied voltage but won`t conduct any appreciable current themselves. This essentially means that the effect of the series resistor (R2) between the voltage divider and the microcontroller is negligible and can be safely ignored ”R2 is installed to limit the current due to ESD (electro-static discharge), protecting the microcontroller from static charges conducted into the switch circuit by a user`s fingers. Ignoring R2, the operation of the switch input circuit can be explained by the interaction of the switch and pull-up resistor R1. You can think about how this works either by Ohm`s law analysis, or by thinking about it as a voltage divider. Using Ohm`s Law analysis, we know that when the switch is open, no current flows through the pull-up resistor. Since no current flows, the voltage loss across the resistor is zero, and the microcontroller input pin...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Squib-firing circuit
    Camera Head (A2075) Manual
    The figure based on LM3S101 adopts the controller to design
    Small Radio Transmitters
    LED Lighting For Consumer Unit Cupboard
    Mobile Scanner Circuit
    IR Remote Control Receiver



    Top