Microcontrollers are capable of detecting binary signals: is the button pressed or not? These are digital signals. When a microcontroller is powered from five volt, it understands zero volts (0V) as a binary 0 and five volts (5V) as a binary 1. But the real world is not so simple and likes to use shades of gray. What if the signal is 2.72V? Is that a zero or a one? We often need to measure signals that vary; these are called analog signals. And these analog signals have to be processed by the microcontroller. But the microcontroller cannot process the analog signals of nature, so these analog signals needs be converted to digital signals first. This conversion can be achieved using an analog to digital converter.In this project, we will learn How to convert an analog signal to digital signal using the Analog to Digital Converter of AVR ATmega32 microcontroller. The AVR ATmega32 has an inbuilt 8 channel, 10 bit analog to digital converter. Here, we will first convert a 5V signal and then a 0V signal with a reference voltage of 5V of ADC. After each conversion, the analog to digital converter of ATmega32 will give a 10-bit value for each signal (5V and 0V).These outputs of the analog to digital converter are displayed in a 1×8 LED array. When a 5V signal is converted, the output of analog to digital converter is 0x3ff (1023) and when 0V signal is converted, the output is 0x00 (0). But the LED array can display only 8-bit at a time. So, the 1×8 LED array will first display the lower 8-bit and then the upper 2-bit of the 10-bit digital output with a delay of 500ms.
I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.ACCEPTPrivacy Policy
Manage consent
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.