ConfigPind.7=Output: Led AliasPortd.7 ConfigPinb.0=Input: Switch AliasPinb.0:Portb.0=1
Do
Toggle Led
If Switch =0ThenWaitms100ElseWaitms300
Loop End
Do
'Cuando es presionado el boton
Toggle Led
If Switch = 0 And Led = 0 Then
Set Led
Waitms 100
Reset Led
Waitms 100
'Cuando no es presionado el boton
Elseif Switch = 1 And Led = 1 Then
Reset Led
Waitms 300
Set Led
Waitms 300
End If
Loop
End
Last edited by Printpix52 on Mon Aug 31, 2015 10:42 am; edited 2 times in total
Config Pind.7 = Output : Led Alias Portd.7
Config Pinb.0 = Input : Switch Alias Pinb.0 : Portb.0 = 1
Do
Toggle Led
If Switch = 0 Then Waitms 100 Else Waitms 300
Loop
End
Do
'Cuando es presionado el boton
Toggle Led
If Switch = 0 And Led = 0 Then
Set Led
Waitms 100
Reset Led
Waitms 100
'Cuando no es presionado el boton
Elseif Switch = 1 And Led = 1 Then
Reset Led
Waitms 300
Set Led
Waitms 300
End If
Loop
End
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum