سلام دوستان من دو تا میکرو داشتم میخواستم با استفاده از ارتباط سریال دو میکرو یه موتور را با استفاده از درایور l6203راه اندازی وکنترل کنم .عکس مدار در پایین صفحه است و همچنین سورس برنامه به زبان بیسکام.اما وقتی با پروتئس شبیه سازی میکنم نرم افزار پیام duplicate part reference:u1[u1] را میدهد.لطفا راهنمایی کنید.
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 9600
Config Porta = Input
Dim A As Byte
Sw1 Alias Porta.0
Sw2 Alias Porta.1
Sw3 Alias Porta.2
Dim Code1 As Byte
Dim Code2 As Byte
Dim Code3 As Byte
Code1 = 10
Code2 = 20
Code3 = 30
Do
If Sw1 = 1 Then
Print Code1
If Sw2 = 1 Then
Print Code2
If Sw3 = 1 Then
Print Code3
End If
End If
End If
Loop
End
برنامه گیرنده:
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 9600
Config Porta = Input
Dim A As Byte
Dim S As Byte
Dim F As Byte
Dim G As Byte
Dim Code As Byte
Dim Code1 As Byte
Dim Code2 As Byte
Dim Code3 As Byte
Do
S = Code1
F = Code2
G = Code3
Code = Waitkey()
If S = 10 Then
Porta.0 = 0
Porta.1 = 1
If F = 20 Then
Porta.0 = 0
Porta.1 = 1
If G = 30 Then
Porta.0 = 1
Porta.1 = 0
End If
End If
End If
Loop
End
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 9600
Config Porta = Input
Dim A As Byte
Sw1 Alias Porta.0
Sw2 Alias Porta.1
Sw3 Alias Porta.2
Dim Code1 As Byte
Dim Code2 As Byte
Dim Code3 As Byte
Code1 = 10
Code2 = 20
Code3 = 30
Do
If Sw1 = 1 Then
Print Code1
If Sw2 = 1 Then
Print Code2
If Sw3 = 1 Then
Print Code3
End If
End If
End If
Loop
End
برنامه گیرنده:
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 9600
Config Porta = Input
Dim A As Byte
Dim S As Byte
Dim F As Byte
Dim G As Byte
Dim Code As Byte
Dim Code1 As Byte
Dim Code2 As Byte
Dim Code3 As Byte
Do
S = Code1
F = Code2
G = Code3
Code = Waitkey()
If S = 10 Then
Porta.0 = 0
Porta.1 = 1
If F = 20 Then
Porta.0 = 0
Porta.1 = 1
If G = 30 Then
Porta.0 = 1
Porta.1 = 0
End If
End If
End If
Loop
End