Hallo,
wollte ein Programm mit 4 Servos und dem Timer schreiben. Hier erst mal das prog.:
Das untere (Waitms 500 Servo(1) = 145,....) funkt nicht, warum nicht ?Code:$regfile = "m8def.dat" $crystal = 16000000 $baud = 9600 Config Servos = 4 , Servo1 = Portd.0 , Servo2 = Portb.0 , Servo3 = Portd.2 , Servo4 = Portd.3 , Reload = 10 Config Pind.0 = Output Config Pinb.0 = Output Config Pind.2 = Output Config Pind.3 = Output Enable Interrupts Do Servo(1) = 100 Servo(2) = 100 Servo(3) = 145 Servo(4) = 100 Waitms 200 Servo(1) = 145 Servo(2) = 100 Servo(3) = 145 Servo(4) = 100 Waitms 500 Servo(1) = 145 Servo(2) = 120 Servo(3) = 145 Servo(4) = 100 Waitms 20000 Loop
Was ist der fehler ?
Viele Grüße und Danke
Lesezeichen