this code its working
include <mega8535.h>
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>
#include <delay.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include<stdio.h>
float current_temp;
float voltage;
char lcdbuffer[16];
//ADC interrupt service routine
interrupt [ADC_INT] void adc_isr(void)
{
unsigned int ADC_DATA;
ADC_DATA=ADCW; // get data from ADC
voltage=((float)4680*(float)ADC_DATA)/(float)1023;
ADCSRA=ADCSRA|0x40;
}
void temp()
{
current_temp=0.1*voltage+2.0;
ftoa(current_temp,2,lcdbuffer);
lcd_gotoxy(8,0);
lcd_puts(lcdbuffer);
}
void main(void)
{
lcd_init(16); // LCD Initialization.
ADMUX=0x01;
ADCSRA=0xAC;
SFIOR&=0x0F;
lcd_gotoxy(0,0);
lcd_putsf("Temp:");
while (1)
{
#asm ("sei")
temp();
};
}