MEGA BOARD WITH LM35 TEMPERATURE PROBLEM

HI EVERY BODY I HAVE
MEGA BOARD AND I TRY TO USE WITH LM35 TEMPERATURE BUT ANALOG PINS RETURN 1023
I TRY MY CODE WITH UNO AND WORK GOOD BUT WITH MEGA NOT WORKING
I MAKE STIMULATION IN PROTEUS AND SAME PROBLEM
THANKS

Mahmoud_Bakry:
HI EVERY BODY I HAVE
MEGA BOARD AND I TRY TO USE WITH LM35 TEMPERATURE BUT ANALOG PINS RETURN 1023
I TRY MY CODE WITH UNO AND WORK GOOD BUT WITH MEGA NOT WORKING
I MAKE STIMULATION IN PROTEUS AND SAME PROBLEM
THANKS

Stop SHOUTING !
We can read just fine without the all caps.

:o Just You Can Say I don't Know

Please post your Mega code and tell us how the LM35 is connected.
HowToPostCode

edgemoron:
Please post your Mega code and tell us how the LM35 is connected.
HowToPostCode

this is my code and connected method with lm35 this work fine with uno but in mega cant read any analog pin
thanks

Please see reply #3

AWOL:
Please see reply #3

OK sorry i am new one.

//initializes/defines the output pin of the LM35 temperature sensor
int senpen= 0;
//this sets the ground pin to LOW and the input voltage pin to high
void setup()
{
Serial.begin(9600);
}

//main loop
void loop()
{
int rawvoltage= analogRead(senpen);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;
Serial.print(celsius);
Serial.print(" degrees Celsius, ");

Serial.print((celsius * 9)/5 + 32);
Serial.println(" degrees Fahrenheit");
delay(1000);
}

Make sure your LM35 is connected correctly, if you previously connected it backwards, you may have killed it.
http://www.ti.com/lit/ds/symlink/lm35.pdf Page 5.

edgemoron:
Make sure your LM35 is connected correctly, if you previously connected it backwards, you may have killed it.
http://www.ti.com/lit/ds/symlink/lm35.pdf Page 5.

thanks
sorry my English so bad
i think i have bad sensor