$regfile = "m8def.dat" $crystal = 1000000 Config Timer1 = Pwm , Pwm = 10 , Compare A Pwm = Clear Down , Prescale = 8 Enable Timer1 Start Timer1 Config Pinb.1 = Output Config Pinc.0 = Input Dim S As Single Dim Pw As Word Config Adc = Single , Prescaler = Auto , Reference = Avcc Start Adc Do Cls ' Umrechnung Auf 50 -100 " Pw = Getadc(0) S = Pw * 50 S = S / 1024 S = S + 50 Pw= S Compare1a = Pw Loop End