Understanding Inputs and Outputs
Usually micro-controllers have different type of Input/Outputs pin which we also refer as I/O Pins.
These pins are typically different type of input and outputs along with some communication pins. To understand communication pins, refer to Understanding Communication Pins on Micro-controllers. In this tutorial we will be understanding basic I/O operations of pins.
Microcontrollers usually have digital and analog input/output pin which are known as digital input, digital output, analog input (ADC) and analog output(PWM/DAC). We have covered basic functions of Arduino IDE used to operate these pin in Basics of Arduino Programming. Let’s look into hardware version of this. One thing to note is that, mostly all the micro-controllers have same type of pins the smaller variants might miss some pins and higher variants might get some more or new type of pins which we will explain in their concerned tutorials.
Almost every micro-controller will have these typical input and outputs pins explained below. We will use Arduino UNO as reference in this tutorial to understand pins. Arduino’s reference voltage is 5V so we will need this information along the way
Digital Pins: In above picture we can see digital pins marked let’s understand what they can do. These are digital pins which means we can use them for both Digital Input and Output. If we consider to use these pins for input it’s like we can read either there is an input on pin or not which will be equal to any voltage between 1v and 5v we cannot tell difference between the amount of input. Similarly, in digital output we can use it for function similar to our normal switch used to turn lights on and off it cannot increase or decrease the intensity of light just on or off.
Analog Pin: Analog Input pins marked in the picture above. In analog its different than digital input here, you can detect how much input is at specific point of time. This means we can tell at that specific point of time what is voltage level between 0V and 5V. Its commonly used to detect input from sensors like temperature sensor, voltage sensor, microphone etc.
In following picture, you can see two analog signals read using analog input pin. The higher the resolution of analog pin the better the result.
Likewise, digital pins with symbol ~ are analog output pins those pins can generate such analog signals from a pin either it’s a signal being read from analog pin and processing is done on it like detecting a specific voice and then give an analog signal through analog output pin.
DC Conversion of AC Signal
Low and High Resolution of AC to DC Converted Signal