-
-
Erfahrener Benutzer
Roboter Experte
Hi,
hier mein Prog aber es funktioniert nicht, was ist falsch ?
Viele Grüße und vielen Dank
$regfile = "m8def.dat"
$crystal = 16000000
Waitms 500
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
Do
Compare1a = 1
Compare1b = 1
Portc.0 = 1
Portc.1 = 0
Portc.2 = 1
Portc.3 = 0
Dim Result As Word
Dim Channel As Byte
Config Adc = Single , Prescaler = Auto , Reference = Avcc
Start Adc
Do
Result = Getadc(portc.4) ; Result ;
If
Result = 1000
Then
Portc.0 = 0
Portc.1 = 1
Portc.2 = 0
Portc.3 = 1
Wait 1
Loop
End
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln
Lesezeichen