Der code
PHP-Code:
$regfile "m168def.dat"
$crystal 8000000


Config Pinc.0 
Input
Config Pinc.1 
Input
Config Pinc.2 
Input
Config Pinc.3 
Input
Config Pinc.4 
Input
Config Pinc.5 
Input

Config Pinb.1 
Output
Config Pinb.2 
Output
Config Pind.5 
Output
Config Pind.6 
Output

Motor1 Alias Pinb.1
Motor2 Alias Pinb.2
Motor3 Alias Pind.5
Motor4 Alias Pind.6
Freischalten Alias Pind.7

Enable Interupts

Enable Pcint1

On Pcint1 Pwm1

Config Pcint1 
Falling

Config Timer1 
Pwm Pwm Compare A Pwm Clear Up Compare B Pwm Clear Up Prescale 1
'Config Timer0 = Pwm , Prescale = 1 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up

Dim M As Byte
Dim N As Byte
Dim X As Byte
Dim Y As Byte

M = 128
N = 128
X = 128
Y = 128



Do

  Compare1b = M


  Freischalten = 1




Loop

Pwm1 :

   If Pinc.0 = 0 Then

      Compare1b = M - 64

      Waitms 2000

   End If

Return

End 
und es funktioniert nicht das das Pwm signal sich verkürtzt beim betätigen des tasters stattdessen geht sie einfach nur für die zeit aus und macht nichts weiter sprigt nach der zeit aber wieder ins Normale Programm
Lg