Y
Yannick De Wit
- Jan 1, 1970
- 0
i try to use the internal ADC with the AT90S8584 but i just can't get it to
work , value is always 0 , i tested if he jumps to the interrupt routine and
this works but he doesn't read the ADC register !!! this is my interrupt
service routine :
//AD convertor registers
ADMUX = 0x00; //select port a0
ADCSR = 0xEF; // free running mode and full prescaling
interrupt [ADC_INT] void adc_isr(void) {
if (ADMUX == 0x01)
{
value = ADCW; //value from port a0
ADMUX = 0x00;
}
else
{
value2 = ADCW; //value from port a1
ADMUX = 0x01;
}
}
thanks for the help
Yannick
work , value is always 0 , i tested if he jumps to the interrupt routine and
this works but he doesn't read the ADC register !!! this is my interrupt
service routine :
//AD convertor registers
ADMUX = 0x00; //select port a0
ADCSR = 0xEF; // free running mode and full prescaling
interrupt [ADC_INT] void adc_isr(void) {
if (ADMUX == 0x01)
{
value = ADCW; //value from port a0
ADMUX = 0x00;
}
else
{
value2 = ADCW; //value from port a1
ADMUX = 0x01;
}
}
thanks for the help
Yannick