ADC-Analog to Digital Conversion in Atmega-16

ADC-Analog to Digital Conversion

ADC stands for Analog to Digital Conversion. It is the process which converts the Analog Signal such as the sound picked by a microphone, or the light entering the camera into the Digital Signals, which is required for further processing of the data. In this article, you will get to know a bit about the process in ADC and also, some features of ADC in Atmega 16 of AVR family of microcontrollers. To know more about the sensors, read this article.

The need of an ADC

Almost all the data that are there in real world, varies continuously. It means they are analog in nature. This implies that all the data that is measured by the sensors must be analog. We need to process this data in order to do various things like for storing or transferring the information. We can process this data in the Analog form itself but analog signal processing is quite inefficient in terms of accuracy, speed, and desired output. Therefore, we have to convert the analog data into the digital data for further processing. Hence the technique is known as Analog to Digital Conversion.

Steps to Acquire Signal

There are three processes involve before processing of the Signal. In the most general way possible, these are some basic steps that occur during the ADC.

  • The sensor measures the quantity, which is analog in nature and converts it into an electrical signal (Voltage or Current).
  • Then this electrical signal is converted into the Digital form using the Analog to Digital Converter. This process includes sampling, quantization, and encoding.
  • This digital signal is fed into the microcontroller for further processing.

ADC of Atmega 16

How can we do this in Atmega 16? Must we need an external IC to this task, right?
No, we don’t need an extra IC to convert our Analog data into Digital because the microcontroller we are using (Atmega16/32) already have this device. The PORTA of the microcontroller contains the ADC pins. Normally this port can be used as simple input/output port but on the situation like this, where we have to perform an ADC, we have to use PORTA of Atmega16/32 as an ADC.

Features of an ADC of Atmega 16

  • The ADC of the Atmega 16 is 8 channel and has a resolution of 10 bit. It means that
    8 channel tells us that there are 8 ADC pins. The PORTA of the Atmega has 8 pins(PA0-PA7).
  • 10-bit resolution means that there are 2^10 steps from 0 to 1023. What it means is described below:
    Suppose we use a 5v reference. What 10-bit resolution means is that it divides 5v into 1024. Then 5 volts will be represented as the value 1023 and 0 volts will be represented as 0. Similarly, 2.5 volts will be represented by the value 512.

I think that be all for this post. In the subsequent post, I am going to tell you how to use and initialize the ADC by interfacing a sensor with Atmega 16.

Leave a Comment

Your email address will not be published. Required fields are marked *

Share This
Scroll to Top