Irgendwie mache ich was falsch, egal bei welchem code. Das ausm Wiki hat bei mir auch nicht funktioniert.
Un hier ist der Code aus dem Buch von Ulli Sommer wobei die Servos heiß werden.
Was mache ich dabei falsch?Code:'Servo.bas 'Microcontroller $regfile = "m32def.dat" 'hier habe ich m8def.dat eingetragen $crystal = 16000000 'und hier 3686400 'Servo Config Porta.2 = Output Declare Sub _servo() Dim Servo_pos As Word Dim Servo_pos_save As Word Dim Multiplikator_servo As Byte Dim Setup As Word Dim X As Byte Multiplikator_servo = 15 Setup = 3900 'Servo Ansteuerung For X = 1 To 50 Servo_pos = 128 'Servo in Mittelstellung fahren Call _servo() Next X Sub _servo() Servo_pos_save = Servo_pos * Multiplikator_servo 'Pulseout berechnen Servo_pos_save = Setup + Servo_pos_save Pulseout Porta , 2 , Servo_pos_save Waitms 10 'kurze Pause (5 bis 20ms) End Sub







Zitieren

Lesezeichen