Even though the microcontrollers are purely digital devices which work on logic0 and logic1 voltages they are commonly found interfaced with analog system or circuits. The microcontroller can read the analog input voltage by sampling it and converting it to their digital values with the help of Analog to Digital Converter (ADC). The microcontroller can also generate an analog voltage on any external device with the help of Pulse Width Modulated (PWM) waves. Most of the microcontrollers have built-in PWM module and ADC modules which helps them in reading analog voltage inputs and generating analog voltage outputs on an external device. Those who have done some basic experiments with the PWM and ADC modules know how complex it is to get them configured, initialized and make them work properly together.