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