Ich danke euch!

Ich habs geschafft!

[php:1:1c6cde8fce]$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 1000000

Config Adc = Single , Prescaler = Auto

Config Portc.0 = Output 'Ein Pin wird als Ausgang konfiguriert PC0 (also Pin0 von Port C)
Config Portc.1 = Output

Start Adc

Dim Channel As Byte




Channel = 0



Do


If Getadc(channel) < 500 Then
Portc.0 = 1
Portc.1 = 0
Else
Portc.0 = 0
Portc.1 = 1
End If

Loop

End[/php:1:1c6cde8fce]

hier jetzt zwar ohne PWM aber das Prinzip hab ich verstanden!

Grüße!
Crypi