Code:
$regfile = "m8def.dat"
$crystal = 16000000

Dim Result As Word
Dim Channel As Byte

Config Pinb.1 = Output
Config Pinb.2 = Output
Config Pinc.0 = Output
Config Pinc.1 = Output
Config Pinc.2 = Output
Config Pinc.3 = Output
Config Pinc.4 = Input

Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up , Prescale = 1


Config Adc = Single , Prescaler = Auto , Reference = Avcc

Compare1a = 1
Compare1b = 1
Portc.0 = 1
Portc.1 = 0
Portc.2 = 1
Portc.3 = 0

Start Adc

Do
Result = Getadc(4) ; Result ;

If
Result = 1000 Then
Portc.0 = 0
Portc.1 = 1
Portc.2 = 0
Portc.3 = 1

Wait 1
Loop

End
Ich habe das Programm mal etwas bearbeitet.
So mache ich es bei mir immer.
Was ich geändert habe findest du, denke ich, selbst raus, wenn du es die nochmal genauer anschaust.

jon