Hallo,ich komme nochimmer nicht weiter,wiso reagiert
Code:
If Pina.7 = 1 Then
Portc.0 = 1
Wait 1
nicht im Code?Gibt es eine andere Möglichkeit den Code zu unterbrechen für eine Minute so das es dann weiter läuft?
Code:
$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 16000000 'Quarzfrequenz
$baud = 9600
Config Pind.5 = Output
Motor1_pwm Alias Portd.5
Config Pinc.6 = Output
Motor1_in1 Alias Portc.6
Config Pinc.7 = Output
Motor1_in2 Alias Portc.7
Config Pind.4 = Output
Motor2_pwm Alias Portd.4
Config Pinb.0 = Output
Motor2_in1 Alias Portb.0
Config Pinb.1 = Output
Motor2_in2 Alias Portb.1
Config Pina.7 = Input
Pina.7 = 1
Tccr1a = &B10100010 '9 Bit PWM Voller Takt
Tccr1b = &B10000011 'Teiler = 8 PWM = 1951Hz bei 9 Bit
Dim I As Word
Sound Portd.7 , 400 , 450 'BEEP
Sound Portd.7 , 400 , 250 'BEEP
Sound Portd.7 , 400 , 450 'BEEP
Wait 3
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''
Do
Print " Richtung1"
Motor1_in1 = 1 'Drehrichtung Motor 1
Motor1_in2 = 0 'Drehrichtung Motor 1
Motor2_in1 = 1 'Drehrichtung Motor 2
Motor2_in2 = 0 'Drehrichtung Motor 2
For I = 0 To 250 'max.511
Pwm1a = I
Pwm1b = I
Waitms 1
Next I
'Bremsen
Pwm1a = 0
Pwm1b = 0
Wait 20
Motor1_in1 = 0 'Drehrichtung Motor 1
Motor1_in2 = 0 'Drehrichtung Motor 1
Motor2_in1 = 0 'Drehrichtung Motor 2
Lesezeichen