Analog to Digital Converter With AVR Microcontroller

by embeddedbymedhavi in Circuits > Microcontrollers

15 Views, 0 Favorites, 0 Comments

Analog to Digital Converter With AVR Microcontroller

adc1.png

ADC: Analog to digital Converter:

ADC Pins and Registers

adc2.png

In ATMEGA16/32, PORTA contains the ADC pins. Some other features of the ADC are as follows:8 channel implies that there are 8 ADC pins are multiplexed together.

You can easily see that these pins are located across PORTA (PA0…PA7).10 bit resolution implies that there are 2^10 = 1024 steps

ADC Registers – ADMUX, ADCSRA, ADCH, ADCL.

ADMUX Register:

adc3.png
adc4.png
adc5.png
adc6.png

ADCSRA Register

adc7.png

Program on ADC Potentiometer Using Sprinf Function

ADCpot.png

Simulation of ADC potentiometer using sprinf function with AVR is given in above.

C Code of ADC ADC potentiometer using sprinf function with AVR:

Downloads

Program on ADC Potentiometer Using Without Sprinf Function

adcpott.png

Simulation of ADC potentiometer using without sprinf function with AVR is given in above.

C Code of ADC ADC potentiometer using without sprinf function with AVR:

Program on ADC (temperature Sensor) Using Sprinf Function

adctemp.png

Simulation of ADC (temperature Sensor) using sprinf function with AVR is given in above.

C Code ofADC (temperature Sensor) using sprinf function with AVR:

Downloads

Program on ADC (temperature Sensor) Using Without Sprinf Function

adctemp1.png

Simulation of ADC (temperature Sensor) using without sprinf function with AVR is given in above.

C Code ofADC (temperature Sensor) using without sprinf function with AVR:

Any Query related Embedded System , IOT and Raspberry PI go to My Blog:

embeddedbymedhavi