Analog to Digital Converter (ADC) in Microprocessor YASH PAL, March 29, 2026March 29, 2026 Analog to Digital Converter (ADC) in Microprocessor – The analog to digital converter (ADC) is exactly the function opposite to that of the DAC. It is an electronic circuit that translates an analog signal into a digital signal. The ADC is a quantizing process whereby an analog signal is represented by an equivalent binary state. The symbol for ADC is shown in the figure below.ADC Circuit SymbolDepending on the criteria of the conversion method, an A/D converter can be broadly classified into two types:Comparing typeConverting typeComparing Type – This technique involves a comparison between a given analog signal and the internally generated equivalent signal. The result of the comparison modifies the internally generated signal, and the process is repeated till exact signal is found. The examples of such ADCs are counter, successive approximation, and flash-type ADCs. These are faster but less accurate.Converter Type – This technique involves changing an analog signal into time or frequency and comparing these new parameters to known values. The examples of such ADCs are single slope, integrator converter (dual slope type), and voltage to frequency converter. These are highly accurate but are slower than the previous type.Parameters of ADCThere are various performance parameters of ADC. These are discussed as follows:Resolution – Resolution is defined as the ratio of a change in value of input voltage, Vi, needed to change the digital output by 1 LSB. If the digital output of all 0’s is changed to all 1’s, because of the full-scale input voltage, Vif, then the resolution is defined asResolution=Vif2n−1Volts/LSBResolution = \frac {V_{if}}{2^n – 1} Volts/LSBAccuracy (Quantization Error) – When the input analog signal is converted into a digital signal, it introduces some errors. This is because all the analog signal values can not be converted into digital values. Some of the approximations have to take in under consideration. This uncertainty is specified as quantization error. This value is ± 1/2LSB. In terms of full-scale input voltage, it is given asQE=Vif2(2n−1)=Resolution2Q_E = \frac {V_{if}}{2(2^n – 1)} = \frac {Resolution}{2} Conversion Time – It is the time required to convert the analog input into an equivalent digital output. Minimum conversion time is desired to speed up the analog-to-digital conversion. It depends on the conversion technique used and the propagation delay of circuit components.Analog to Digital Conversion TechniquesAnalog-to-digital converters are used to convert the analog input signal from the real world into a binary equivalent for internal processing of the microprocessor. There are different types of ADCs available, and some of them aresingle-slope ADCDual slope ADCSuccessive approximation ADCFlash ADCSingle Slop ADCThe single-slope ADC is based on a comparison technique. It consists of a ramp generator and a BCD counter (as shown in the figure below). Initially, the ramp generator and BCD counter are both reset. In this ADC, a comparator is used, which compares the analog input and output of the ramp generator. If the analog input is high, the comparator gives a high output; otherwise, a low output. The high output of the comparator enables the AND gate, which allows the clock to reach the counter. The clock signal increments the counter and the output of the ramp generator. This process is repeated till the output of the ramp generator reaches an equal or greater value than the analog input.At this position, the output of the comparator goes low and disables the AND gate. Now the control circuitry provides a signal that latches the counter value and displayed using a display device. A reset signal is generated, which resets the counter as well as the ramp generator.Single-slope ADCNote: Single slope ADC is generally not used because of very little resolution and variations in the ramp generator due to time, temperature, and input voltage sensitivity.Dual Slope ADCThe dual slope ADC is designed with an integrator and a counter. It is an indirect method for A/D conversion. This ADC involves a technique in which analog voltage and a reference voltage are converted into time periods by the integrator, and then measured by the counter. The figure below shows the block diagram for a dual-slope ADC. The switch S1, as shown in the figure below, connects either to the analog input voltage (Vin) or a negative reference voltage (-Vref). Initially (t=0), switch S1 connects the analog voltage Vin for a fixed count. Thus, the output voltage of the integrator is givenVoc=∫0T1V1dtV_{oc} = \int_0^{T_1}V_1dt=−ViR1C1T2 = – \frac {V_i}{R_1C_1} T_2Where R1C1 is the integrator time constant, and input voltage Vi is assumed constant over the integration time period (0 to T1). After the T1 time period, the control logic switches the integrator input to the reference voltage (Vref), and the counter is reset. Since the polarity of Vref is opposite to the input voltage, the capacitor of the integrator circuit starts discharging. The counter starts counting again from zero as the capacitor begins to discharge for the period T2. This results in a ramp with opposite slope, and the counter is stopped when the ramp crosses the zero level. Now the output of the integrator is given asVOD=∫0T2VrefdtV_{OD} = \int_0^{T_2}V_{ref}dt=−VrefR1C1T1 = – \frac {V_{ref}}{R_1C_1} T_1The integrator outputs a voltage ramp and gets back up to 0. Therefore, the charge voltage is equal to the discharge voltage. From the above two equations, we can writeViR1C1T1=VrefR1C1T2\frac {V_{i}}{R_1C_1} T_1 = \frac {V_{ref}}{R_1C_1} T_2⇒T2=ViVrefTi\Rightarrow T_2 = \frac {V_i}{V_{ref}}T_i The above equation shows that T2 is directly proportional to input analog voltage (Vi), whereas Vi and T1 are constants. The actual conversion of analog voltage (Vin) into a digital count occurs during T2. The counter contents are a digital output. Therefore, we can writedigital output=(CountsSecond)T2digital\space output = \left( \frac {Counts}{Second}\right)T_2From the above equation, substitute the value of T2digital output=(CountsSecond)(ViVref)T1digital\space output = \left( \frac {Counts}{Second}\right) \left( \frac {V_i}{V_{ref}}\right)T_1The above equation shows the digital output obtained by the dual slope ADC.Advantages:It is highly accurateIts cost is lowIt is immune to temperature-caused variations in R1 and C1.LimitationIts speed is low.Dual slope AD converter block diagramConversion process of a dual slope AD converterSuccessive Approximation ADCThe successive approximation ADC is based on the searching strategy called binary search. The block diagram of the successive approximation ADC is shown in the figure below. It consists of a DAC, a comparator, and a successive approximation register (SAR).Successive approximation ADCThe analog input voltage (Vi) is applied to the positive terminal of the comparator. When the start of conversion (SOC) signal is received by the SAR, the most significant bit of the SAR is set to ‘1’. Now the binary code stored in the SAR is transferred to the DAC. DAC converts the digital signal into an equivalent analog signal, which is compared with the analog input. The comparator output will be high if the analog input is higher than the output of the DAC. This high signal, now, sets the next bit to the MSB. If the output of the comparator is low, the MSB will be reset, and the next bit to the MSB will be set. This process is repeated till the desired output is received. The end of conversion is indicated by the EOC signal.Conversion process of a 3-bit successive approximation resistor SARIn the case of a 3-bit successive approximation ADC, the most significant bit (MSB) is D3 = 1. The count value (710) is converted into analog form with the help of the DAC. The output of the DAC is compared with the analog input voltage. If analog input is higher than the output of DAC, then D3 = 1 and D2 = 1; otherwise D3 = 0 and D2 = 1. The same process is repeated with D2 = 1, then with D1 = 1. The time for one analog-to-digital conversion must depend on both the clock’s period T and the number of bits n. It is given as,Tc = T(n+1) where Tc = Conversion time T = Clock period and n = number of bitsFlash ADCThe flash ADC is the fastest ADC in all the ADCs. Flash ADCs, also known as a simultaneous or parallel comparator ADC, because the fast conversion speed, which is accomplished by providing 2n-1 comparators and simultaneously comparing the input signal with unique reference levels spaced 1LSB apart.A 3-bit flash ADC is shown in the figure below. This ADC needs 7(23-1) comparator. One of the inputs of each comparator is connected to the analog input, and the other input to the reference voltage level generated by the reference voltage divider. The reference voltage is equal to the full-scale input signal voltage. The code resulting from the comparators is applied to the encoder, which converts the code coming from the comparators to the binary code.3 Bit Flash ADCInterfacing of an Analog-to-Digital ConverterThe microprocessor is a logic device; it processes digital signals that are binary and discontinuous in nature. On the other hand, the real-world physical quantities are continuous. This condition generates a need to interface an analog-to-digital converter, which converts the analog inputs and provides the digital signal to the microprocessor for further processing. There are several ADCs available that are compatible with the microprocessor.Interfacing of ADC 0801 with the 8085 MicroprocessorThe ADC 0801 is an 8-bit successive approximation A/D converter. This is a 20-pin IC. The input voltage can range from 0 to 5V and operates with a single power supply of +5V. The pin diagram for ADC 0801 in the figure below. The ADC 0801 has two inputs, VIN(+) and VIN(-), for the differential analog signal. When the analog signal is single-ended, one pin (according to polarity) is used, and the other is grounded. The ADC 0801 requires a clock signal at CLK IN. The frequency range of the clock signal can be from 100kHz to 800kHz.Pin diagram for ADC 0801The ADC 0801 is designed to be microprocessor compatible. There are three pins, named CS, WR, and RD, that are used to interface the ADC with the microprocessor. The block diagram for ADC interfacing with the microprocessor 8085 is shown in the figure below.Interfacing of ADC 0801 with the microprocessorTo start the conversion from analog to digital signal, the CS and WR signals are asserted low. When WR goes low, the internal SAR is reset, and output lines go into a high impedance state. When WR makes a transition from low to high, the conversion begins. When conversion is completed, the signal INTR goes low, and data is placed on the data bus. The INTR signal can be used to inform the microprocessor that the conversion is completed and digital data is available on the data bus. When the microprocessor reads the data by asserting RD, the INTR is reset.Interfacing of ADC 7109 with the 8085 MicroprocessorThe analog-to-digital converter 7109 is a high-performance, low-power integrating (Dual slope) ADC designed to easily interface with a microprocessor. The ADC 7109 is a 12-bit ADC that has polarity and over-range bits. It has low noise and very low input current. It can perform 30 conversions per second. The pin diagram for ADC 7109 is shown in the figure below.Pin diagram for ADC 7109The ADC 7109 can be interfaced directly or indirectly (with the help of a programmable IC) to the 8085 microprocessor. In direct interfacing, the CE/LOAD signal serves as a chip select signal, which is controlled by the microprocessor’s IOR signal. The low-order byte output and higher-order byte output are enabled by LBEN and HBEN signals, respectively. These signals are driven by the address lines A15 and A14 signals respectively. The 8085 microprocessor can read data (high-order byte or low-order byte) by executing an Input/Output read cycle. This is shown in the figure below.Interfacing of ADC 7109 with the microprocessor engineering subjects Microprocessor microprocessor