Hallo Stefan,
ich habe den ADC noch nicht auf die Register Art benutzt - warum willst du das eigentlich machen - aber die Reihenfolge deiner Befehle kommt mir doch etwas seltsam vor:
Code:
  Adcsra.adsc = 1                                           '       ADCSRA 86
  Ddra.0 = 1                                                '          DDRA 01 bzw. 0B
  Ddra.2 = 1                                                '          DDRA 05 bzw. 0F
  Ddra.1 = 0                                                '          DDRA 05 bzw. 0D
  Ddra.3 = 0                                                '           DDRA 05 bzw. 05
  Porta.0 = 1                                               '           PORTA 01 bzw. 09
  Porta.2 = 0                                               '          PORTA 01 bzw. 09
  Admux.mux0 = 1                                            '       ADMUX 41 bzw. 43
  Admux.mux1 = 1                                            '       ADMUX 43
  Y = Adc
Ich hätte es eher so gemacht:
Code:
  Ddra.0 = 1                                                '          DDRA 01 bzw. 0B
  Ddra.2 = 1                                                '          DDRA 05 bzw. 0F
  Ddra.1 = 0                                                '          DDRA 05 bzw. 0D
  Ddra.3 = 0                                                '           DDRA 05 bzw. 05
  Porta.0 = 1                                               '           PORTA 01 bzw. 09
  Porta.2 = 0                                               '          PORTA 01 bzw. 09
  Admux.mux0 = 1                                            '       ADMUX 41 bzw. 43
  Admux.mux1 = 1                                            '       ADMUX 43
  Adcsra.adsc = 1                                           '       ADCSRA 86
  While Adcsra.adsc = 1                                     'Warteschleife bis Konvertierung fertig ist
  Wend
  Y = Adc
Ich weiß auch nicht, ob Bascom die Zeile
Y = ADC
richtig umsetzt. Laut Datenblatt:

When ADCL is read, the ADC Data Register is not updated until ADCH is read. Consequently, 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.