'atmega8
$regfile = "m8def.dat"
'quarz frequenz
$crystal = 3686400
$baud = 9600
Ddrc = &B00000000
Admux = &B01100000
Adcsr = &B11100010
Dim Value As Byte
Dim I As Word
Const Maxsamples = 150
Dim Bout(maxsamples) As Byte
Do
For I = 1 To Maxsamples
Bout(i) = Adch
Next I
For I = 1 To Maxsamples
Udr = Bout(i)
Do : Loop Until Ucsra.udre = 1
Next I
Loop