ايران ويج

نسخه‌ی کامل: چراغ راهنمايي قابل تنظيم
شما در حال مشاهده‌ی نسخه‌ی متنی این صفحه می‌باشید. مشاهده‌ی نسخه‌ی کامل با قالب بندی مناسب.
صفحه‌ها: 1 2 3
سلام
آقا امروز پروزه را بردم استاد قبول نكرد گفت بايد با سگمنت مالتي پلكس كار كنم
من روش كار كردم اينو نوشتم كار ميكنه
کد php:
$regfile = "m16def.dat"
$crystal = 8000000

Dim X 
As Integer , Y As Integer , , I As Integer

X 
= 0
Y 
= 0

Config Portc 
= Output
Config Porta 
= Output
Do

     For 
I = 1 To 15

        Portc.0 
= 0
        Portc.1 
= 1
        Porta 
= Lookup(x , P1)
        
Waitms 2

        Portc.1 
= 0
        Portc.0 
= 1
        Porta 
= Lookup(y , P1)
        
Waitms 6

     Next I

     Incr X

     
If X = 10 Then
         Incr Y
         X 
= 0
     End 
If

     If 
Y = 10 Then
        X 
= 0
        Y 
= 0
     End 
If

Loop

End



P1
:
Data -64 , -7 , -92 , -80 , -103 , -110 , -125 , -8 , -128 , -104 

البته اينو از شمارنده 4 رقمي برداشتم و برنامه را يكم تغيير دادم و از 0 تا 99 ميشماره تو پروزه من بايد معكوس شمارش كنه و البته از عددي كه وارد ميكنم بشماره ميخواستم يه توضيحي دربارش بدي
و يه سوال ؟؟؟ تو data از اين اعداد سر در نميارم چرا به جاش معادل باينري 0 تا 9 را نميذاريم البته اين كار را كردم جواب نداد
از كمكت ممنونم
نقل قول: آقا امروز پروزه را بردم استاد قبول نكرد گفت بايد با سگمنت مالتي پلكس كار كنم.
گفتم از روش رفرش استفاده كن ...

------------------
در مورد سوالي كه پرسيدي ...
بسته به اتصال پايه هاي 7seg به ميكرو ، هر جوري بخواي مي توني جدول رو درست كني.
حالا اين طرفي كه برنامه رو نوشته ، پايه ها رو به صورت زير وصل كرده بودهه ...
76543210
GFEDCBA.

به ترتيب هست ، A بيت كم ارزش و اون DOT ( . ) با ارزش ترين بيت.
نوع 7seg اي هم كه استفاده كرده احتمالا آند مشترك بودهه ...

توي مدار منطقي چطوري يه عدد رو منفي مي كرديم ، ببين درست مي گم...
-64 :
64 = 01000000
مكمل 2 اش :
10111111
اين مقدار +1 :
11000000
اين اولين خانه ي جدول هست و عدد 0 رو نشون مي دهه ، هر كدوم 1 خاموش و هر كدوم صفر ، روشن.
برطبق چيزي كه گفتم ، G و " . " خاموش هستن و بقيه روشن و مي شه همون 0.

بعديش رو هم مي گم و باقيش با خودت.
براي -7:
7=00000111
مكمل2 :
11111000
اين مقدار +1
11111001
يعني سگمنت هاي b , c روشن و بقيه خاموش و در نتيجه عدد 1 رو نشون مي دهه ...

باقيش هم به همين ترتيب ...

البته لزومي ندارهه كه جدول حتما اينطوري باشه و دست خودته ...

موفق باشي.

سلام ببخشيد سوالام زياد شد
برنامه را به صورت زير نوشتم
کد php:
$regfile = "m16def.dat"
$crystal = 8000000

Config Portc 
= Output
Config Porta 
= Output
Config Kbd 
= Portd , Debounce = 50 , Delay = 1
Dim A 
As Byte
Dim B1 
As Byte
Dim B2 
As Byte
Dim Num 
As Byte
Dim B 
As Byte
Dim C 
As Byte
Dim K 
As Byte

Dim X 
As Integer , Y As Integer , I As Integer

X 
= 0
Y 
= 0


Goto Halat
 Halat
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Halat
 End 
If
 If 
A = 0 Then
 
Goto Halat
 End 
If
 If 
A = 1 Then
 
Goto Halat
 End 
If
 If 
A = 2 Then
 
Goto Halat
 End 
If
 If 
A = 4 Then
 
Goto Halat
 End 
If
 If 
A = 5 Then
 
Goto Halat
 End 
If
 If 
A = 6 Then
 
Goto Halat
 End 
If
 If 
A = 8 Then
 
Goto Halat
 End 
If

 If 
A = 9 Then
 
Goto Halat
 End 
If
 If 
A = 10 Then
 
Goto Halat
 End 
If
 If 
A = 11 Then
 
Goto Halat
 End 
If
 If 
A = 12 Then
 
Goto Halat
 End 
If
 If 
A = 13 Then
 
Goto Halat
 End 
If
 If 
A = 14 Then
 
Goto Halat
 End 
If
 If 
A = 15 Then
 
Goto Halat
 End 
If

 If 
A = 3 Then
 
Do
 
Portc = 0
 Set Portc.2

 Set Portc.7

 Waitms 800
 Reset Portc.2

 Reset Portc.7
 Waitms 700
 Loop

 End 
If
 If 
A = 7 Then

 
Goto Adad1

 Adad1
:
 
Porta = -64
 Set Portc.0
 Set Portc.1

 A 
= Getkbd()
 If 
A > 15 Then
 
Goto Adad1
 End 
If
 If 
A = 3 Then
 
Goto Adad1
 End 
If
 If 
A = 7 Then
 
Goto Adad1
 End 
If
 If 
A = 11 Then
 
Goto Adad1
 End 
If
 If 
A = 12 Then
 
Goto Adad1
 End 
If
 If 
A = 14 Then
 
Goto Adad1
 End 
If

 
B = Lookup(a , W)
 
Waitms 300
 
Goto Adad2
 Adad2
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Adad2
 End 
If
 If 
A = 3 Then
 
Goto Adad2
 End 
If
 If 
A = 7 Then
 
Goto Adad2
 End 
If
 If 
A = 11 Then
 
Goto Adad2
 End 
If
 If 
A = 12 Then
 
Goto Adad2
 End 
If
 If 
A = 14 Then
 
Goto Adad2
 End 
If

 
B1 = Lookup(a , W)
Waitms 300


End 
If
Goto 
Sett
 Sett
:
 
A = Getkbd()


If 
A = 12 Then

Goto Prog1
Else
Goto 
Sett
End 
If

Prog1:


Do


Y = B
X 
= B1


 
Do
 For 
I = X To 0 Step -1
 
For K = 1 To 95

 Portc.0 
= 0
 Portc.1 
= 1
 Porta 
= Lookup(x , P1)
 
Waitms 2

 Portc.1 
= 0
 Portc.0 
= 1
 Porta 
= Lookup(y , P1)
 
Waitms 6

 Next K
 
If X = 0 Then
 Decr Y
 X 
= 9
 End 
If

 If 
Y = 0 Then
 X 
= 0
Decr X
 Next I
 


 End 
If

Loop

End



Loop

End
 W
:
 
Data 1 , 2 , 3 , 99 , 4 , 5 , 6 , 99 , 7 , 8 , 9 , 99 , 99 , 0 , 99 , 99



P1
:
Data -64 , -7 , -92 , -80 , -103 , -110 , -125 , -8 , -128 , -104 
الان تنها مشكي كه دارم اينه كه مثلا بار اول 2و بار دوم 9 را وارد ميكنم شروع ميكنه از 29 ميشماره تا 21 بعدش 20 را نميده و 19 را نشون ميده دوباره تا11 ميشماره 10 را نشون نميده ميره به 9آخرش هم وقتي به 0 ميرسه قاطي ميكنه و دوباره از عددي كه وارد كردم نميشماره











برنامه اي كه نوشتيد ، خيلي اشكالات پايه اي دارهه ...!
خيلي از قسمت ها اضافي هستن ...
3 تا Do-Loop تو در تو چه معني يي مي ده ؟!
در آخرين حلقه هم 2ومين شرط اشتباه هست و در كل هر دو شرط رو بايد هوشمندانه تر بذاريد ، اينطوري امكان دارهه هر 2 شرط با هم برقرار بشن ...
مثلا موقعي كه y در آستانه ي صفر شدن هست ، هر دو شرط اجرا مي شن و...

برنامه رو دقيق تر و اصولي تر بنويسيد و دقيقا چكش كنيد ، اينطوري راحت نمي شه چكش كرد.
در سري هاي بعدي اگر مي دونيد تيكه ي خاصي از كد مشكل دارهه همون رو بذاريد .

ببينيم چه مي كني ...

موفق باشي.
سلام بالاخره درستش كردم سورس برنامه با عكس پروتئوس را ميزارم تا بقيه دوستان هم ازش استفاده كنند
کد php:
 

$regfile 
= "m16def.dat"
$crystal = 8000000

Config Portc 
= Output
Config Porta 
= Output
Config Portb 
= Output
Config Kbd 
= Portd , Debounce = 50 , Delay = 1
Dim A 
As Byte
Dim B1 
As Byte
Dim B2 
As Byte
Dim Num 
As Byte
Dim B 
As Byte
Dim C 
As Byte
Dim K 
As Byte
Dim L 
As Integer , M As Integer
Dim X 
As Integer , Y As Integer , I As Integer




Goto Halat
 Halat
:
    
A = Getkbd()
   If 
A > 15 Then
   
Goto Halat
   End 
If
   If 
A = 0 Then
   
Goto Halat
   End 
If
   If 
A = 1 Then
   
Goto Halat
   End 
If
   If 
A = 2 Then
   
Goto Halat
   End 
If
   If 
A = 4 Then
   
Goto Halat
   End 
If
   If 
A = 5 Then
   
Goto Halat
   End 
If
   If 
A = 6 Then
   
Goto Halat
   End 
If
   If 
A = 8 Then
   
Goto Halat
   End 
If

   If 
A = 9 Then
   
Goto Halat
   End 
If
   If 
A = 10 Then
   
Goto Halat
   End 
If
   If 
A = 11 Then
   
Goto Halat
   End 
If
   If 
A = 12 Then
   
Goto Halat
   End 
If
   If 
A = 13 Then
   
Goto Halat
   End 
If
   If 
A = 14 Then
   
Goto Halat
   End 
If
   If 
A = 15 Then
   
Goto Halat
   End 
If

   If 
A = 3 Then
      
Do
      
Portc = 0
      Set Portc.3

      Set Portc.7

      Waitms 700
      Reset Portc.3

      Reset Portc.7
      Waitms 700
      Loop

     End 
If
    If 
A = 7 Then

      
Goto Adad1

    Adad1
:
    
Portb = -64
    Porta 
= -64
    Set Portc.0
    Set Portc.1


    A 
= Getkbd()
    If 
A > 15 Then
    
Goto Adad1
    End 
If
     If 
A = 3 Then
    
Goto Adad1
    End 
If
          If 
A = 7 Then
    
Goto Adad1
    End 
If
     If 
A = 11 Then
    
Goto Adad1
    End 
If
     If 
A = 12 Then
    
Goto Adad1
    End 
If
     If 
A = 14 Then
    
Goto Adad1
    End 
If

    
B = Lookup(a , W)
    
Waitms 300
     
Goto Adad2
    Adad2
:
    
A = Getkbd()
    If 
A > 15 Then
    
Goto Adad2
    End 
If
     If 
A = 3 Then
    
Goto Adad2
    End 
If
     If 
A = 7 Then
    
Goto Adad2
    End 
If
     If 
A = 11 Then
    
Goto Adad2
    End 
If
     If 
A = 12 Then
    
Goto Adad2
    End 
If
     If 
A = 14 Then
    
Goto Adad2
    End 
If

    
B1 = Lookup(a , W)
Waitms 300


End 
If
Goto 
Sett
    Sett
:
    
A = Getkbd()


If 
A = 12 Then

Goto Prog1
Else
Goto 
Sett
End 
If

Prog1:





Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do
      If 
X <> 0 And Y >= 0 Then
          Set Portc.4
          Reset Portc.3
          End 
If

      If 
X = 0 Or X = 2 Then                                'without'
          
Set Portc.4
          Reset Portc.3
           End 
If


       If 
L <> 0 And M >= 0 Then
          Set Portc.5
          Reset Portc.7
          End 
If

         For 
K = 1 To 135
         
       Portc.0 
= 0
        Portc.1 
= 1
        Porta 
= Lookup(x , P1)
        
Portb = Lookup(l , P1)

        
Waitms 2
       Portc.1 
= 0
        Portc.0 
= 1
        Porta 
= Lookup(y , P1)
        
Portb = Lookup(m , P1)

        
Waitms 6
          Next K
          Decr X
           Decr L
     
If X = -1 And Y <> 0 Then
         
If Y = 0 Then

           Reset Portc.4
           Set Portc.2
           Reset Portc.6
           Set Portc.7
           End 
If
    
Decr Y
    X 
= 9
     End 
If

     If 
Y = -1 Then
      X 
= 0
      Y 
= 0
      End 
If
      If 
L = 0 And M = 0 Then
          Reset Portc.5
          Set Portc.6

          End 
If
       If 
L = -1 Then

       Decr M
       L 
= 9
       End 
If
       If 
M = -1 Then
       M 
= 0
       L 
= 0

       End 
If

       If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
       
Goto Gesmate2
       End 
If
Loop

End





End
    W
:
   
Data 1 , 2 , 3 , 99 , 4 , 5 , 6 , 99 , 7 , 8 , 9 , 99 , 99 , 0 , 99 , 99



P1
:
Data -64 , -7 , -92 , -80 , -103 , -110 , -125 , -8 , -128 , -104




Gesmate2
:
 
Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do

     If 
X <> 0 And Y >= 0 Then
          Set Portc.7
          Reset Portc.6
          End 
If
     If 
L <> 0 And M >= 0 Then
          Set Portc.2
          Reset Portc.4
          End 
If


         For 
K = 1 To 135
       Portc.0 
= 0
        Portc.1 
= 1
        Portb 
= Lookup(x , P1)
        
Porta = Lookup(l , P1)

        
Waitms 2
       Portc.1 
= 0
        Portc.0 
= 1
        Portb 
= Lookup(y , P1)
        
Porta = Lookup(m , P1)

        
Waitms 6
          Next K
          Decr X
           Decr L
     
If X = -1 And Y <> 0 Then
      Decr Y
    X 
= 9
     End 
If


     If 
Y = -1 Then

      X 
= 0
      Y 
= 0
      End 
If
      If 
L = 0 And M = 0 Then
          Reset Portc.2
          Set Portc.3

          End 
If
       If 
L = -1 Then

       Decr M
       L 
= 9
       End 
If
       If 
M = -1 Then
       M 
= 0
       L 
= 0

       End 
If

       If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
       
Goto Prog1
       End 
If

 
Loop 
(۰۸-اردیبهشت-۱۳۹۱, ۱۸:۵۵:۰۴)navid_sa_198 نوشته است: [ -> ]سلام بالاخره درستش كردم سورس برنامه با عكس پروتئوس را ميزارم تا بقيه دوستان هم ازش استفاده كنند
کد php:
 

$regfile 
= "m16def.dat"
$crystal = 8000000

Config Portc 
= Output
Config Porta 
= Output
Config Portb 
= Output
Config Kbd 
= Portd , Debounce = 50 , Delay = 1
Dim A 
As Byte
Dim B1 
As Byte
Dim B2 
As Byte
Dim Num 
As Byte
Dim B 
As Byte
Dim C 
As Byte
Dim K 
As Byte
Dim L 
As Integer , M As Integer
Dim X 
As Integer , Y As Integer , I As Integer




Goto Halat
 Halat
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Halat
 End 
If
 If 
A = 0 Then
 
Goto Halat
 End 
If
 If 
A = 1 Then
 
Goto Halat
 End 
If
 If 
A = 2 Then
 
Goto Halat
 End 
If
 If 
A = 4 Then
 
Goto Halat
 End 
If
 If 
A = 5 Then
 
Goto Halat
 End 
If
 If 
A = 6 Then
 
Goto Halat
 End 
If
 If 
A = 8 Then
 
Goto Halat
 End 
If

 If 
A = 9 Then
 
Goto Halat
 End 
If
 If 
A = 10 Then
 
Goto Halat
 End 
If
 If 
A = 11 Then
 
Goto Halat
 End 
If
 If 
A = 12 Then
 
Goto Halat
 End 
If
 If 
A = 13 Then
 
Goto Halat
 End 
If
 If 
A = 14 Then
 
Goto Halat
 End 
If
 If 
A = 15 Then
 
Goto Halat
 End 
If

 If 
A = 3 Then
 
Do
 
Portc = 0
 Set Portc.3

 Set Portc.7

 Waitms 700
 Reset Portc.3

 Reset Portc.7
 Waitms 700
 Loop

 End 
If
 If 
A = 7 Then

 
Goto Adad1

 Adad1
:
 
Portb = -64
 Porta 
= -64
 Set Portc.0
 Set Portc.1


 A 
= Getkbd()
 If 
A > 15 Then
 
Goto Adad1
 End 
If
 If 
A = 3 Then
 
Goto Adad1
 End 
If
 If 
A = 7 Then
 
Goto Adad1
 End 
If
 If 
A = 11 Then
 
Goto Adad1
 End 
If
 If 
A = 12 Then
 
Goto Adad1
 End 
If
 If 
A = 14 Then
 
Goto Adad1
 End 
If

 
B = Lookup(a , W)
 
Waitms 300
 
Goto Adad2
 Adad2
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Adad2
 End 
If
 If 
A = 3 Then
 
Goto Adad2
 End 
If
 If 
A = 7 Then
 
Goto Adad2
 End 
If
 If 
A = 11 Then
 
Goto Adad2
 End 
If
 If 
A = 12 Then
 
Goto Adad2
 End 
If
 If 
A = 14 Then
 
Goto Adad2
 End 
If

 
B1 = Lookup(a , W)
Waitms 300


End 
If
Goto 
Sett
 Sett
:
 
A = Getkbd()


If 
A = 12 Then

Goto Prog1
Else
Goto 
Sett
End 
If

Prog1:





Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do
 If 
X <> 0 And Y >= 0 Then
 Set Portc.4
 Reset Portc.3
 End 
If

 If 
X = 0 Or X = 2 Then 'without'
 
Set Portc.4
 Reset Portc.3
 End 
If


 If 
L <> 0 And M >= 0 Then
 Set Portc.5
 Reset Portc.7
 End 
If

 For 
K = 1 To 135
 
 Portc.0 
= 0
 Portc.1 
= 1
 Porta 
= Lookup(x , P1)
 
Portb = Lookup(l , P1)

 
Waitms 2
 Portc.1 
= 0
 Portc.0 
= 1
 Porta 
= Lookup(y , P1)
 
Portb = Lookup(m , P1)

 
Waitms 6
 Next K
 Decr X
 Decr L
 
If X = -1 And Y <> 0 Then
 
If Y = 0 Then

 Reset Portc.4
 Set Portc.2
 Reset Portc.6
 Set Portc.7
 End 
If
 
Decr Y
 X 
= 9
 End 
If

 If 
Y = -1 Then
 X 
= 0
 Y 
= 0
 End 
If
 If 
L = 0 And M = 0 Then
 Reset Portc.5
 Set Portc.6

 End 
If
 If 
L = -1 Then

 Decr M
 L 
= 9
 End 
If
 If 
M = -1 Then
 M 
= 0
 L 
= 0

 End 
If

 If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
 
Goto Gesmate2
 End 
If
Loop

End





End
 W
:
 
Data 1 , 2 , 3 , 99 , 4 , 5 , 6 , 99 , 7 , 8 , 9 , 99 , 99 , 0 , 99 , 99



P1
:
Data -64 , -7 , -92 , -80 , -103 , -110 , -125 , -8 , -128 , -104




Gesmate2
:
 
Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do

 If 
X <> 0 And Y >= 0 Then
 Set Portc.7
 Reset Portc.6
 End 
If
 If 
L <> 0 And M >= 0 Then
 Set Portc.2
 Reset Portc.4
 End 
If


 For 
K = 1 To 135
 Portc.0 
= 0
 Portc.1 
= 1
 Portb 
= Lookup(x , P1)
 
Porta = Lookup(l , P1)

 
Waitms 2
 Portc.1 
= 0
 Portc.0 
= 1
 Portb 
= Lookup(y , P1)
 
Porta = Lookup(m , P1)

 
Waitms 6
 Next K
 Decr X
 Decr L
 
If X = -1 And Y <> 0 Then
 Decr Y
 X 
= 9
 End 
If


 If 
Y = -1 Then

 X 
= 0
 Y 
= 0
 End 
If
 If 
L = 0 And M = 0 Then
 Reset Portc.2
 Set Portc.3

 End 
If
 If 
L = -1 Then

 Decr M
 L 
= 9
 End 
If
 If 
M = -1 Then
 M 
= 0
 L 
= 0

 End 
If

 If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
 
Goto Prog1
 End 
If

 
Loop 

سلام دوست عزیز
لطف میکنید تمام فایلهای مربوط برای ساخت رو اینجا قرار بدید .
pcb و hex و بقیه فایلها .
(۰۶-خرداد-۱۳۹۱, ۲۱:۳۱:۰۳)amz4 نوشته است: [ -> ]
(۰۸-اردیبهشت-۱۳۹۱, ۱۸:۵۵:۰۴)navid_sa_198 نوشته است: [ -> ]سلام بالاخره درستش كردم سورس برنامه با عكس پروتئوس را ميزارم تا بقيه دوستان هم ازش استفاده كنند
کد php:
 

$regfile 
= "m16def.dat"
$crystal = 8000000

Config Portc 
= Output
Config Porta 
= Output
Config Portb 
= Output
Config Kbd 
= Portd , Debounce = 50 , Delay = 1
Dim A 
As Byte
Dim B1 
As Byte
Dim B2 
As Byte
Dim Num 
As Byte
Dim B 
As Byte
Dim C 
As Byte
Dim K 
As Byte
Dim L 
As Integer , M As Integer
Dim X 
As Integer , Y As Integer , I As Integer




Goto Halat
 Halat
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Halat
 End 
If
 If 
A = 0 Then
 
Goto Halat
 End 
If
 If 
A = 1 Then
 
Goto Halat
 End 
If
 If 
A = 2 Then
 
Goto Halat
 End 
If
 If 
A = 4 Then
 
Goto Halat
 End 
If
 If 
A = 5 Then
 
Goto Halat
 End 
If
 If 
A = 6 Then
 
Goto Halat
 End 
If
 If 
A = 8 Then
 
Goto Halat
 End 
If

 If 
A = 9 Then
 
Goto Halat
 End 
If
 If 
A = 10 Then
 
Goto Halat
 End 
If
 If 
A = 11 Then
 
Goto Halat
 End 
If
 If 
A = 12 Then
 
Goto Halat
 End 
If
 If 
A = 13 Then
 
Goto Halat
 End 
If
 If 
A = 14 Then
 
Goto Halat
 End 
If
 If 
A = 15 Then
 
Goto Halat
 End 
If

 If 
A = 3 Then
 
Do
 
Portc = 0
 Set Portc.3

 Set Portc.7

 Waitms 700
 Reset Portc.3

 Reset Portc.7
 Waitms 700
 Loop

 End 
If
 If 
A = 7 Then

 
Goto Adad1

 Adad1
:
 
Portb = -64
 Porta 
= -64
 Set Portc.0
 Set Portc.1


 A 
= Getkbd()
 If 
A > 15 Then
 
Goto Adad1
 End 
If
 If 
A = 3 Then
 
Goto Adad1
 End 
If
 If 
A = 7 Then
 
Goto Adad1
 End 
If
 If 
A = 11 Then
 
Goto Adad1
 End 
If
 If 
A = 12 Then
 
Goto Adad1
 End 
If
 If 
A = 14 Then
 
Goto Adad1
 End 
If

 
B = Lookup(a , W)
 
Waitms 300
 
Goto Adad2
 Adad2
:
 
A = Getkbd()
 If 
A > 15 Then
 
Goto Adad2
 End 
If
 If 
A = 3 Then
 
Goto Adad2
 End 
If
 If 
A = 7 Then
 
Goto Adad2
 End 
If
 If 
A = 11 Then
 
Goto Adad2
 End 
If
 If 
A = 12 Then
 
Goto Adad2
 End 
If
 If 
A = 14 Then
 
Goto Adad2
 End 
If

 
B1 = Lookup(a , W)
Waitms 300


End 
If
Goto 
Sett
 Sett
:
 
A = Getkbd()


If 
A = 12 Then

Goto Prog1
Else
Goto 
Sett
End 
If

Prog1:





Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do
 If 
X <> 0 And Y >= 0 Then
 Set Portc.4
 Reset Portc.3
 End 
If

 If 
X = 0 Or X = 2 Then 'without'
 
Set Portc.4
 Reset Portc.3
 End 
If


 If 
L <> 0 And M >= 0 Then
 Set Portc.5
 Reset Portc.7
 End 
If

 For 
K = 1 To 135
 
 Portc.0 
= 0
 Portc.1 
= 1
 Porta 
= Lookup(x , P1)
 
Portb = Lookup(l , P1)

 
Waitms 2
 Portc.1 
= 0
 Portc.0 
= 1
 Porta 
= Lookup(y , P1)
 
Portb = Lookup(m , P1)

 
Waitms 6
 Next K
 Decr X
 Decr L
 
If X = -1 And Y <> 0 Then
 
If Y = 0 Then

 Reset Portc.4
 Set Portc.2
 Reset Portc.6
 Set Portc.7
 End 
If
 
Decr Y
 X 
= 9
 End 
If

 If 
Y = -1 Then
 X 
= 0
 Y 
= 0
 End 
If
 If 
L = 0 And M = 0 Then
 Reset Portc.5
 Set Portc.6

 End 
If
 If 
L = -1 Then

 Decr M
 L 
= 9
 End 
If
 If 
M = -1 Then
 M 
= 0
 L 
= 0

 End 
If

 If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
 
Goto Gesmate2
 End 
If
Loop

End





End
 W
:
 
Data 1 , 2 , 3 , 99 , 4 , 5 , 6 , 99 , 7 , 8 , 9 , 99 , 99 , 0 , 99 , 99



P1
:
Data -64 , -7 , -92 , -80 , -103 , -110 , -125 , -8 , -128 , -104




Gesmate2
:
 
Y = B
X 
= B1
L 
= B1 - 2
M 
= B
If B1 = 0 Then
L 
= 8
M 
= B - 1
End 
If
If 
B1 = 1 Then
L 
= 9
M 
= B - 1
End 
If




 Do

 If 
X <> 0 And Y >= 0 Then
 Set Portc.7
 Reset Portc.6
 End 
If
 If 
L <> 0 And M >= 0 Then
 Set Portc.2
 Reset Portc.4
 End 
If


 For 
K = 1 To 135
 Portc.0 
= 0
 Portc.1 
= 1
 Portb 
= Lookup(x , P1)
 
Porta = Lookup(l , P1)

 
Waitms 2
 Portc.1 
= 0
 Portc.0 
= 1
 Portb 
= Lookup(y , P1)
 
Porta = Lookup(m , P1)

 
Waitms 6
 Next K
 Decr X
 Decr L
 
If X = -1 And Y <> 0 Then
 Decr Y
 X 
= 9
 End 
If


 If 
Y = -1 Then

 X 
= 0
 Y 
= 0
 End 
If
 If 
L = 0 And M = 0 Then
 Reset Portc.2
 Set Portc.3

 End 
If
 If 
L = -1 Then

 Decr M
 L 
= 9
 End 
If
 If 
M = -1 Then
 M 
= 0
 L 
= 0

 End 
If

 If 
X = -1 And Y = 0 And L = 0 And M = 0 Then
 
Goto Prog1
 End 
If

 
Loop 

سلام دوست عزیز
لطف میکنید تمام فایلهای مربوط برای ساخت رو اینجا قرار بدید .
pcb و hex و بقیه فایلها .
سلام
من كه تموم فايل ها رو گذاشتم
من رو برد بسته بودم واسه PCB پروتئوس واست ميده عكس پروتئوس را هم گذاشتم و فايل هگز هم اگه اف7 را بزني تو بسكام اونم واست ميده فكر كردم لازم نيستن واسه همين نذاشتمشون

صفحه‌ها: 1 2 3