$regfile = "at26def.dat" $crystal = 1000000 Config Porta = Output Config Portb = Input Portb = 1 Declare Sub Switch Dim N As Bit N = 0 Do Debounce Pinb.0 , 0 , Switch , Sub If N = 1 Then Toggle Porta.0 Waitms 100 End If Loop End Sub Switch Toggle N End Sub