Hi ,ich hab versucht .
Hier unter nochmals neue code.(Wie du meinst)
Code:
$programmer = 13
$crystal = 16000000
$baud = 9600
$regfile = "m32def.dat"
Config Int0 = Falling
Dim Zaehlerirq0 As Long
Zaehlerirq0 = 0
Enable Interrupts
On Int0 Irq0
Enable Int0
Config Timer1 = Pwm , Pwm = 8 , Compare B Pwm = Clear Down
Pwm1b = 0
Tccr1b = Tccr1b Or &H02
Config Pinc.6 = Output
Config Pinc.7 = Output
Config Pind.4 = Output
'Hauptprogramm
Do
Portc.6 = 1
Portc.7 = 0
Portd.4 = 1
Pwm1b = 80
Print Zaehlerirq0
Waitms 500
Loop Until Zaehlerirq0 > 500
Portc.6 = 0
Portc.7 = 0
Pwm1b = 0
End
Irq0:
Incr Zaehlerirq0
Return
Aber der Motor läuf ohne Ende und in Terminal emulator bekomme ich nur 0.
MFG
Lesezeichen