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:

New Circuits



Popular Circuits

1 button ON / OFF Switch with 555
Motor speed controller using LM324
Low-Ohms Adapter
Audio Analogue to Digital Converter AD2496
build one transistor fm radio
digital room thermometer using lm35 sensor 8051 microcontroller
metal detector circuit
High gain microphone preamplifier electronic project
Flyback Transformer Drivers
Multi-functional 100W Power Inverter with 5V USB
OCL AC negative feedback amplifier analysis