LM35 output varies when connected to microcontroller
You may have the AVR internal pull-up still enabled, from the ATmega16A Datasheet you can see the following:


  If PORTxn is written logic one when the
  pin is configured as an input pin, the pull-up resistor is activated. To
  switch the pull-up resistor off,
  PORTxn has to be written logic zero or the pin has to be configured as an output
  pin. The port pins are tri-stated when a reset condition becomes active, even if no clocks are running


So try setting the corresponding PORT value to zero to ensure the internal pull-ups are disabled. Often when interfacing with sensors having the pull-ups enabled will cause a higher that expected voltage to appear on the pin. With digital interfacing you will also sometimes see similar symptoms when you have a low and high pin working against each other due to a pin configuration problem.