اطلاعیه

Collapse
No announcement yet.

درخواست ادیت برنامه قفل رمز 4تا12 رقمی

Collapse
X
 
  • فیلتر
  • زمان
  • Show
Clear All
new posts

    درخواست ادیت برنامه قفل رمز 4تا12 رقمی

    سلام،برنامه ی قفل رمز 4تا12 رقمی زیر رو میخواستم قابلیت تغییر رمز هم براش ایجادشه، کسی از دوستان میتونه ادیتش کنه؟
    خودم آشنایی با این زبون ندارم متاسفانه :cry:
    کد:
    $regfile = "m16def.dat".dat "
    $crystal = 8000000
    Config Lcdpin = Pin , Db4 = Pc.0 , Db5 = Pc.1 , Db6 = Pc.2 , _
    Db7 = Pc.3 , Rs = Pc.4 , E = Pc.5
    Config Lcd = 16 * 2
    Config Portc.6 = Output
    Config Portc.7 = Output
    Config Pina.0 = Input
    Config Kbd = Portd , Debounce = 250 , Delay = 200
    Dim Key(13) As Byte , I As Byte , A As Single , Code As Single , Error As Byte
    Key(13) = 20
    Code = 9999999
    
    Do
      Cls : Home : Lcd "enter pass="
      Locate 2 , 1
      For I = 1 To 13
       L1:
        Key(i) = Getkbd()
        If Key(i) = 16 Then Goto L1
        Key(i) = Lookup(key(i) , Dat1)
        If Key(i) = 20 Then Goto L1
    
        If Key(i) = 15then
        Select Case I
        Case 1 To 4:
               Cls : Home : Lcd "limit digit num"
    
        End Select
        Exit For
        End If
    
        If Key(13) < 10then
        Locate 1 , 1 : Lcd "error key"
        Goto L1
        End If
    
        Lcd "*"
        A = A * 10
        A = A + Key(i)
    
    
    Next
    Wait 1
    
     If A = Code Then
       Error = 0
       Set Portc.6
       Reset Portc.7
       Cls : Lcd "correct pass"
     Else
       Reset Portc.6
       Set Portc.7
       Cls : Lcd "invalid pass"
       Incr Error
     End If
    
    
     If Error = 3then
     Cls : Lcd "key disabled"
     Bitwait Pina.0 , Set
     Cls : Lcd "key enable"
     Error = 0
     End If
    
     Wait 2
     A = 0
     Reset Portc.6
     Reset Portc.7
    
    Loop
    End
    Dat1:
    Data 7 , 8 , 9 , 20 , 4 , 5 , 6 , 20 , 1 , 2 , 3 , 20 , 20 , 0 , 20 , 15

    #2
    پاسخ : درخواست ادیت برنامه قفل رمز 4تا12 رقمی

    از دوستان کسی نمیتونه کمک کنه؟ :sad:
    خیلی ب این برنامه احتیاج دارم...

    دیدگاه

    لطفا صبر کنید...
    X