need help in LM35 interfacing with AT mega16

Status
Not open for further replies.

dineshkumar89

Newbie level 1
Joined
Sep 1, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
i'm a beginner to use microcontrollers and i'm using AVRstudio4 for programming.i've used adc correctly. but i cant get corect output. my project is to use lm35 for temparature controlled alarm system. if the temperature is above 35 degrees i've to activate an alarm but i'm not getting the correct result.. i've used adc setting as AVCC with external capacitor at AREF pin. i've used only the 8 bits of adc value only.i've compared the adc value with 35 as
t=adc_read(1)
if(t>35)
PORTB=0xFF;

but i dint get any output when the temperature is above 35 degrees. pls help me to complete this project.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…