Difference between revisions of "Reading Temperature with AVR ADC"
Line 2: | Line 2: | ||
The Atmega32 comes with a 10-bit, 8 channel inbuilt Ananlog to Digital Convertor (ADC). We will set it up and read temperature from LM35 and light with a simple (light dependent Resistor)LDR. So let's get started! | The Atmega32 comes with a 10-bit, 8 channel inbuilt Ananlog to Digital Convertor (ADC). We will set it up and read temperature from LM35 and light with a simple (light dependent Resistor)LDR. So let's get started! | ||
=Basics= | =Basics= | ||
+ | '''ADC Control and Status Register A (ACSRA):'''<br/> | ||
+ | {| class = "table table-responsive table-striped " | ||
+ | |- | ||
+ | |7||6||5||4||3||2||1||0 | ||
+ | |- | ||
+ | |ADEN||ADSC||ADATE ||ADIF ||ADIE ||ADPS2 ||ADPS1 ||ADPS0 | ||
+ | |- | ||
+ | |1||0||0||0||0||0||0||1 | ||
+ | |} | ||
+ | |||
=Hook up= | =Hook up= |
Revision as of 17:51, 25 March 2016
The Atmega32 comes with a 10-bit, 8 channel inbuilt Ananlog to Digital Convertor (ADC). We will set it up and read temperature from LM35 and light with a simple (light dependent Resistor)LDR. So let's get started!
Basics
ADC Control and Status Register A (ACSRA):
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
ADEN | ADSC | ADATE | ADIF | ADIE | ADPS2 | ADPS1 | ADPS0 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |