Ich verwende Bascom als denke ich wohl das es Basic ist.
Hier ist mein Programm:
Code:
$regfile = "m168def.dat"
$crystal = 16000000 'Quarzfrequenz
$baud = 9600
$hwstack = 32
$framesize = 32
$swstack = 32
Dim Center11 As Byte
Dim Center21 As Byte
Dim Pos11 As Byte
Dim Pos21 As Byte
Center11 = 105
Pos11 = 5
Center21 = 125
Pos21 = 20
'Servo config
Config Servos = 1 , Servo1 = Portc.1 , Reload = 10
Config Portc = Output
'finally we must turn on the global interrupt
Enable Interrupts
'ende Servo config
Do
' Print "center"
' Servo(1) = Center11
' Waitms 1000
Print "pos1"
Servo(1) = Pos11
Wait 1000
' Print "center"
' Servo(1) = Center11
' Wait 1000
Print "pos2"
Servo(1) = Pos21
Wait 1000
Loop
Allerdings fährt das Servo in Endlage und zittert dann nur noch...
MfG
Scarabol
Lesezeichen