اطلاعیه

Collapse
No announcement yet.

تبدیل کد بیسیک به سی

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

    تبدیل کد بیسیک به سی

    بازم سلام
    این کدی که پایین گذاشتم مربوط به میکروکنترلر AVR به زبان بیسیک هستش . کسی هست که اینو تبدیل به کد سی برای AVR کنه .
    خیلی خیلی ممنون میشم اگه کسی این لطفو در حقم بکنه

    کد:
    Dim Res As Long
    Dim Quan As Long
    Dim I As Integer
    Dim U As Integer
    Dim Ad As String * 8
    Dim Inte As String * 8
    Dim Lim As Long
    Dim Numb As Long
    Dim Fer As Long
    Cursor Off
    Cls
    Config Timer1 = Timer , Prescale = 8 , Compare A = Toggle , Clear Timer = 1
    Config Timer0 = Counter , Edge = Rising
    Config Timer2 = Timer , Prescale = 64
    Config Kbd = Porta
    Enable Interrupts
    Enable Counter0
    Enable Timer2
    Enable Timer1
    Enable Oc1a
    Stop Timer1
    Stop Timer0
    Stop Timer2
    Timer2 = 131
    On Timer2 Over
    On Counter0 Amir
    
    Do
    Mahdi:
     U = Getkbd()
    
     If U = 15 Then Goto Kian
    
     If U < 14 Then Gosub Nini
    
    Loop
    
    kian:
    Start Timer0
    Start Timer2
    
    Numb = Lim
    Fer = 500000 / Numb
    Compare1a = Fer
    
    
    Start Timer1
    
    Cls
    Do
     U = Getkbd()
    If U = 14 Then
     Inte = ""
     Goto Mahdi
     End If
    
    Loop
    End
    
    Over:
    Incr I
    Timer2 = 131
    If I = 125 Then
    Stop Timer2
    Stop Counter0
    Res = Quan * 256
    Res = Res + Counter0
    
    Cls : Lcd Res ; " hz"
    Quan = 0 : I = 0 : Counter0 = 0
    Start Counter0 : Start Timer2
    End If
    Return
    
    Amir:
    Incr Quan
    Return
    
    Nini:
    
    Cls
    
    Ad = Lookupstr(u , D1)
    
    
    Inte = Inte + Ad
    Lim = Val(inte)
    Lcd Lim
    
    
    Do
     U = Getkbd()
    Loop Until U = 16
    Return
    
    
    D1:
    Data "1" , "2" , "3" , "20" , "4" , "5" , "6" , "21" , "7" , "8" , "9" , "22" , "23" , "0" , "24" , "25"

    #2
    پاسخ : تبدیل کد بیسیک به سی

    سلام .................

    این سوال با پست زیر ارتباطی داره؟

    http://www.eca.ir/forum2/index.php?topic=24596.0
    دوستان! مدتی کمتر به سایت میام ..

    دیدگاه

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