LÖSUNG:
JUCHU - Es funzt!!!
Zitat aus dem Datenblatt:
In den Quellcode mit rein:Bit 4 – ADIF: ADC Interrupt Flag
This bit is set when an ADC conversion completes and the Data Registers are updated. The
ADC Conversion Complete Interrupt is executed if the ADIE bit and the I-bit in SREG are set.
ADIF is cleared by hardware when executing the corresponding interrupt handling vector. Alter-
natively, ADIF is cleared by writing a logical one to the flag. Beware that if doing a Read-Modify-
Write on ADCSRA, a pending interrupt can be disabled. This also applies if the SBI and CBI
instructions are used.
Und schon geht es :-DCode:void POS_LDR_INIT (void) { ADMUX |= (1 << REFS0); // AVCC als Refferenz ADCSRA |= (1 << ADEN) | (1 << ADATE) | (1 << ADIF) | (1 << ADIE); // ADC enable + triggern enable + ISR wenn fertig + enable interrupt SFIOR |= (1 << ADTS2) | (1 << ADTS1); // triggern bei timer1 überlauf sei(); }
(Und zu allem Überfluss schafft es der ADC doch glatt, in weniger als 83µs zu Wandeln -> Angst unbegründet -> PERFEKT :-D )
Viele Grüße und vielen Dank!
-schumi-
PS: Den Sourcen-Download oben habe ich aktualisiert und funzt jetz - Wer abgucken möchte^^







Zitieren

Lesezeichen