$regfile = "m8def.dat"
Config Adc = Single , Prescaler = Auto
Config Portb = Output
Dim W As Word , Channel As Byte
Start Adc
Do
W = Getadc(5)
If W > 0 then Portb.0 = 0 else Portb.0 = 1
Loop
End
Das ist mein kleiner Code.
"W" hat den wert des PC.5 Ports! (Getadc(5))
MfG,
ShadowPhoenix
Lesezeichen