hi also ich hab jetzt die enable pins auf high und dan die input pins alle nach einander auf high gelegt und der Schrittmotor dreht sich völlig ohne system vor und zurück und wakclet hin und her
hier ist der code ich weiß net was ich falsch mach
Code:$regfile = "m32Def.dat" $crystal = 16000000 Config Portb.0 = Output Motor1_spule1a Alias Portb.0 Config Portb.1 = Output Motor1_spule1b Alias Portb.1 Config Portc.6 = Output Motor1_spule2a Alias Portc.6 Config Portc.7 = Output Motor1_spule2b Alias Portc.7 Config Pina.0 = Input Taster_links Alias Pina.0 Config Pina.1 = Input Taster_rechts Alias Pina.1 Config Portd.5 = Output Config Portd.4 = Output Porta.1 = 1 Porta.0 = 1 Portd.5 = 1 Portd.4 = 1 Do If Taster_rechts = 0 Then Motor1_spule1a = 1 Motor1_spule1b = 0 Motor1_spule2a = 0 Motor1_spule2b = 0 Waitms 2 Motor1_spule1a = 0 Motor1_spule1b = 1 Motor1_spule2a = 0 Motor1_spule2b = 0 Waitms 2 Motor1_spule1a = 0 Motor1_spule1b = 0 Motor1_spule2a = 1 Motor1_spule2b = 0 Waitms 2 Motor1_spule1a = 0 Motor1_spule1b = 0 Motor1_spule2a = 0 Motor1_spule2b = 1 Waitms 2 End If Loop End







Zitieren

Lesezeichen