Hey,
schau mal hier:
"If the result is left adjusted and no more than 8-bit precision is
required, it is sufficient to read
ADCH. Otherwise, ADCL must be read first, then ADCH, to ensure that the
content of the data
registers belongs to the same conversion. Once ADCL is read, ADC access
to data registers is
blocked. This means that if ADCL has been read, and a conversion
completes before ADCH is
read, neither register is updated and the result from the conversion is
lost. When ADCH is read,
ADC access to the ADCH and ADCL Registers is re-enabled."
Samuel K. schrieb:
> Mir ist noch eingefallen, das ich eigentlich ADCW >> 2 nehmen muss um
> den Wert abzufragen: Wenn das Signal größer ist als 256 kommt Murks
> heraus.
Da du im Programm nur das Low Byte gelesen hast brauchst du das Ergebnis
nicht um 2 Stellen verschieben.
Der ATTiny hat sehr wohl einen Freeruning Mode. Schau da noch mal ins
Datenblatt.
Im Register ADCSRB, die Bits ADTS2 ADTS1 ADTS0 sind dafür
verantwortlich.
MfG,
Julian