Source Code :
$regfile = "reg51.dat"
$crystal = 12000000
Do
If P3.0 = 0 And P0.0 = 1 Then
P0.0 = 0
Waitms 250
End If
If P3.0 = 0 And P0.0 = 0 Then
P0.0 = 1
Waitms 250
End If
If P3.1 = 0 And P0.1 = 1 Then
P0.1 = 0
Waitms 250
End If
If P3.1 = 0 And P0.1 = 0 Then
P0.1 = 1
Waitms 250
End If
If P3.2 = 0 And P0.2 = 1 Then
P0.2 = 0
Waitms 250
End If
If P3.2 = 0 And P0.2 = 0 Then
P0.2 = 1
Waitms 250
End If
If P3.3 = 0 And P0.3 = 1 Then
P0.3 = 0
Waitms 250
End If
If P3.3 = 0 And P0.3 = 0 Then
P0.3 = 1
Waitms 250
End If
If P3.4 = 0 And P0.4 = 1 Then
P0.4 = 0
Waitms 250
End If
If P3.4 = 0 And P0.4 = 0 Then
P0.4 = 1
Waitms 250
End If
If P3.5 = 0 And P0.5 = 1 Then
P0.5 = 0
Waitms 250
End If
If P3.5 = 0 And P0.5 = 0 Then
P0.5 = 1
Waitms 250
End If
If P3.6 = 0 And P0.6 = 1 Then
P0.6 = 0
Waitms 250
End If
If P3.6 = 0 And P0.6 = 0 Then
P0.6 = 1
Waitms 250
End If
If P3.7 = 0 And P0.7 = 1 Then
P0.7 = 0
Waitms 250
End If
If P3.7 = 0 And P0.7 = 0 Then
P0.7 = 1
Waitms 250
End If
Loop
0 opmerkings:
Plaas 'n opmerking