Anda di halaman 1dari 6

Config Portc = Input

Config Portb = Output

Config Portd = Input

Do

If Pinc.2 = 1 Then

Portb = &B11111101

Waitms 50

Portb = &B01111101

Waitms 50

Portb = &010111101

Waitms 50

Portb = &B01010101

Waitms 50

Portb = &B01011101

Waitms 50

Portb = &B01111101

Waitms 50

Portb = &B11111101

Waitms 50

Portb = &B11111111

Waitms 50

Portb = &B11111110
Waitms 50

Portb = &B01111010

Waitms 50

Portb = &B11101010

Waitms 50

Portb = &B10101010

Waitms 50

Portb = &B11101010

Waitms 50

Portb = &B11111010

Waitms 50

Portb = &B11111110

Waitms 50

Portb = &B11111111

Waitms 50

Portb = &B01010101

Waitms 50

Portb = &B10101010

Waitms 50

Portb = &B01010101

Waitms 50

Portb = &B10101010

Waitms 50

Portb = &B01010101

Waitms 50
Portb = &B10101010

Waitms 50

End If

If Pinc.3 = 1 Then

End If

If Pinc.4 = 1 Then

End If

If Pinc.5 = 1 Then

Portb = &B11111110

Waitms 50

Portb = &B01111101

Waitms 50

Portb = &B10111011

Waitms 50

Portb = &B11010111

Waitms 50

Portb = &B11101111

Waitms 50

Portb = &B11010111
Waitms 50

Portb = &B10111011

Waitms 50

Portb = &B01111101

Waitms 50

Portb = &B11111111

End If

If Pind.0 = 1 Then

Portb = &B11111110

Waitms 50

Portb = &B11111101

Waitms 50

Portb = &B11111011

Waitms 50

Portb = &B11110111

Waitms 50

Portb = &B11101111

Waitms 50

Portb = &B11011111

Waitms 50

Portb = &B10111111

Waitms 50

Portb = &B01111111
Waitms 50

Portb = &B11111111

End If

If Pind.1 = 1 Then

Portb = &B11111110

Waitms 50

Portb = &B01111111

Waitms 50

Portb = &B10111111

Waitms 50

Portb = &B11011111

Waitms 50

Portb = &B11101111

Waitms 50

Portb = &B11110111

Waitms 50

Portb = &B11111011

Waitms 50

Portb = &B11111101

Waitms 50

Portb = &B11111111

End If
If Pind.2 = 1 Then

Portb = &B00000000

Waitms 50

Portb = &B11111111

Waitms 50

End If

If Pind.3 = 1 Then

Portb = &B01010101

Waitms 50

Portb = &B10101010

Waitms 50

End If

Loop

End

Anda mungkin juga menyukai