Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] help

2008-09-12 by hashem Yaghobnejad

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]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.