[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] The ADC interrurpt can't triger in studio?
From: |
whiteman |
Subject: |
[avr-gcc-list] The ADC interrurpt can't triger in studio? |
Date: |
Wed, 24 Mar 2004 9:15:54 +0800 |
HI,all!
I used studio4.08 simulate the program as follows:
SIGNAL(SIG_ADC) //ADC server
{
ADC_L = ADCL;
ADC_H = ADCH;
}
int main(void)
{
DDRC = (1<<DDC5)|(1<<DDC6);
DDRD = 0xc0;
DDRB = 1 << DDB0;
ADMUX = 0x40; //ADC channel 0
ADCSRA = 0x85; //ADC clock is
125k
ADCSRA = (1 << ADIF) |(1 << ADIE) | ADCSRA;
sei();
//enable the global interrupt
Delay(10000);
;
;
while(1)
{
PORTC = PORTC^0x20;
Delay(60000);
ADCSRA = (1 << ADSC) |ADCSRA; //START ADC
;
;
for(;;){}
}
return(0);
}
I simulate this program. I have started the ADC converter and man-made
modified the interrupt flag "ADIF" to 1,but the studio can't triger the ADC
interrup, don't execute the server. Whether it is a buy in studion or in gcc??
thanks!!!
best regard
whiteman
address@hidden
2004-03-24
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list
- [avr-gcc-list] The ADC interrurpt can't triger in studio?,
whiteman <=