Hi quad,

sorry wegen der Pins, da war ich wohl von Blindheit erschlagen.

Das Beispielprogramm DEBOUN.BAS ist folgendermasen aufgebaut.

'-----------------------------------------------------
' DEBOUN.BAS
' Demonstrates DEBOUNCE
'-----------------------------------------------------
Config Debounce = 30 'when the config statement is not used a default of 25mS will be used


'Debounce Pind.0 , 1 , Pr 'try this for branching when high(1)
Debounce Pind.0 , 0 , Pr , Sub
Debounce Pind.0 , 0 , Pr , Sub

'When Pind.0 goes low jump to subroutine Pr
'Pind.0 must go high again before it jumps again
'to the label Pr when Pind.0 is low

Debounce Pind.0 , 1 , Pr 'no branch
Debounce Pind.0 , 1 , Pr 'will result in a return without gosub
End

Pr:
Print "PIND.0 was/is low"
Return
Demnach liegt Dein Problem in der Definition der Subroutine.

Der Anfang der Subroutine beginnt mit einer Markendefinition und endet mit einem Return.

mit :
Code:
Declare Sub t_0 
Declare Sub t_1 

Portd.4 = 1                                                  
Portd.5 = 1 

Do 

Debounce Pind.4 , 0 , t_0 , Sub                      
Debounce Pind.5 , 0 , t_1 , Sub 

Loop 
End 

t_0 :
     Waitms 2000 
Return

t_1 :
     Waitms 4000 
Return
müsste es funktionieren.

Gruß Klaus