Hello My Friend.
where are you from ? I 'm iranian .
your problem is very simple :
you can connect Temp. sensor to ADC(0) , and active them Registers :
//////////////////////////////////////////// codevision Avr :
// ADC Function:
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input
ADCSRA|=0x40;
while ((ADCSRA & 0x10)==0);
return ADCW;
}
void main()
{
int adc;
char str[10];
// ADC Clock frequency: 125.000 kHz
ADMUX=0x00;
ADCSRA=0x83;
while(1)
{
adc=read_adc(0);
itoa(adc,str);
lcd_puts(str);
delay_ms(200);
lcd_clear();
}
///////////////////////////////////////////////////
GoodLuck My Friend .
[Non-text portions of this message have been removed]Message
Re: [AVR-Chat] help
2008-09-12 by hashem Yaghobnejad
Attachments
- No local attachments were found for this message.