Code:
Do
W = Getadc(0)

If W > 230 Then Portc.0 = 0 Else Portc.0 = 1
If W > 250 Then Portc.1 = 0 Else Portc.1 = 1
If W > 270 Then Portc.2 = 0 Else Portc.2 = 1
If W > 290 Then Portc.3 = 0 Else Portc.3 = 1
If W > 310 Then Portc.4 = 0 Else Portc.4 = 1
If W > 330 Then Portc.5 = 0 Else Portc.5 = 1
If W > 350 Then Portc.6 = 0 Else Portc.6 = 1
If W > 370 Then Portc.7 = 0 Else Portc.7 = 1
Loop
Änderungen:
= durch > ersetzt
für portc.6 und 7 Zahlenwerte geändert
Punkt bei getadc entfernt