اطلاعیه

Collapse
No announcement yet.

خطاگرفتن بسکام برای کامپایل کردن lcd ks108

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

    خطاگرفتن بسکام برای کامپایل کردن lcd ks108

    سلام
    این برنامه برای ال سی دی گرافیکی موقع کامپایل بسکام ازش خطا میگیره
    $lib "glcdKS108.lbx"
    $regfile = "m8def.dat" ' specify the used micro
    $crystal = 8000000 ' used crystal frequency




    'some routines to control the display are in the glcdKS108.lib file

    'First we define that we use a graphic LCD
    Config Graphlcd = 128 * 64sed , Dataport = Portd , Controlport = Portb , Ce = 1 , Ce2 = 0 , Cd = 2 , Rd = 3 , Reset = 4 , Enable = 5


    Lcdat 4 , 1 , "0123456789..."
    End


    تو کتابخانه ks108 دارم
    زندگی یه فرصته

    #2
    پاسخ : خطاگرفتن بسکام برای کامپایل کردن lcd ks108

    سلام
    من یه برنامه دارم که با ال سی دی گرافیکیه ببین به دردت میخوره؟ البته کامل نیست .
    این برنامه فقط چند تا عکس رو نشون میده بقیه چیزهاش کشکیه
    موفق باشید.


    $regfile = "m32def.dat"
    $crystal = 8000000
    Config Porta = Output
    Config Portb = Output
    Config Portc = Output

    Config Spi = Hard , Interrupt = On , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 128
    On Spi Spi_isr Nosave
    Enable Interrupts
    Spiinit
    Config Kbd = Portd

    $lib "glcdKS108.lib"
    Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portb , Ce = 4 , Ce2 = 3 , Cd = 0 , Rd = 1 , Reset = 6 , Enable = 2
    Config Lcdpin = , Db4 = Pinc.2 , Db5 = Pinc.3 , Db6 = Pinc.4 , Db7 = Pinc.5 , Rs = Pinc.0 , E = Pinc.1
    Dim Text As String * 10
    Dim Count As Byte
    Dim I As Byte
    Dim A As Word
    Dim Data_kbd As Byte
    Dim Place As String * 15
    Dim M As String * 5
    Showpic 0 , 0 , Start_rec
    Text = ""
    Place = "Start_rec"










    Do
    'Data_kbd = Getkbd()
    Data_kbd = 2

    If Data_kbd <> 0 Then Gosub Place


    Loop


    Place:

    If Data_kbd = 2 Then M = "Up"
    If Data_kbd = 4 Then M = "Chap"
    If Data_kbd = 6 Then M = "rast"
    If Data_kbd = 8 Then M = "down"
    Return
    Place_2:
    If Place = "Start_rec" Then
    If M = "Up" Then
    Place = "play"
    Showpic 0 , 0 , Play
    End If
    If M = "Down" Then
    Place = "ready"
    Showpic 0 , 0 , Ready
    End If
    If M = "Chap" Then
    Place = "pass"
    Showpic 0 , 0 , Change_password
    End If
    If M = "Rast" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    End If



    If Place = "ready" Then
    If M = "Up" Then
    Place = "Start_rec"
    Showpic 0 , 0 , Start_rec
    End If
    If M = "Down" Then
    Place = "play"
    Showpic 0 , 0 , Play
    End If
    If M = "Chap" Then
    Place = "Fm"
    Showpic 0 , 0 , Format_memory
    End If
    If M = "Rast" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    End If



    If Place = "play" Then
    If M = "Up" Then
    Place = "ready"
    Showpic 0 , 0 , Ready
    End If
    If M = "Down" Then
    Place = "Start_rec"
    Showpic 0 , 0 , Start_rec
    End If
    If M = "Chap" Then
    Place = "recovery"
    Showpic 0 , 0 , Recovery
    End If
    If M = "Rast" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    End If




    If Place = "pass" Then
    If M = "Up" Then
    Place = "recovery"
    Showpic 0 , 0 , Recovery
    End If
    If M = "Down" Then
    Place = "fm"
    Showpic 0 , 0 , Format_memory
    End If
    If M = "Chap" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    If M = "Rast" Then
    Place = "Start_rec"
    Showpic 0 , 0 , Start_rec
    End If
    End If








    If Place = "fm" Then
    If M = "Up" Then
    Place = "pass"
    Showpic 0 , 0 , Change_password
    End If
    If M = "Down" Then
    Place = "recovery"
    Showpic 0 , 0 , Recovery
    End If
    If M = "Chap" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    If M = "Rast" Then
    Place = "ready"
    Showpic 0 , 0 , Ready
    End If
    End If









    If Place = "recovery" Then
    If M = "Up" Then
    Place = "fm"
    Showpic 0 , 0 ,Format_memory
    End If
    If M = "Down" Then
    Place = "pass"
    Showpic 0 , 0 , Pass
    End If
    If M = "Chap" Then
    Place = "close"
    Showpic 0 , 0 , Close
    End If
    If M = "Rast" Then
    Place = "play"
    Showpic 0 , 0 , Play
    End If
    End If


    If Place = "close" Then
    If M = "Chap" Then
    Place = "play"
    Showpic 0 , 0 , Play
    End If
    If M = "Rast" Then
    Place = "recovery"
    Showpic 0 , 0 , Recovery
    End If
    End If



    Return




    Setare:
    $bgf "setare.bgf"
    Start_rec:
    $bgf "s-r.bgf"
    Ready:
    $bgf "re.bgf"
    Play:
    $bgf "play.bgf"
    Pass:
    $bgf "pass.bgf"
    Format_memory:
    $bgf "Fm.bgf"
    Recovery:
    $bgf "RI.bgf"
    Close:
    $bgf "close.bgf"
    Change_password:
    $bgf "Change Password.bgf"
    Cursor_on:
    $bgf "Cursor-on.bgf"
    Cursor_off:
    $bgf "Cursor-off.bgf"





    Pass_1:
    Showpic 120 , 8 , Cursor_on
    Count = Len(text)
    For I = 1 To Count
    A = I * 8
    A = A + 24
    Showpic A , 8 , Setare
    Wait 1
    Next
    Return

    Pass_2:
    Showpic 120 , 8 , Cursor_off
    Showpic 120 , 24 , Cursor_on
    Count = Len(text)
    For I = 1 To Count
    A = I * 8
    A = A + 24
    Showpic A , 24 , Setare
    Wait 1
    Next
    Return

    Pass_3:
    Showpic 120 , 24 , Cursor_off
    Showpic 120 , 40 , Cursor_on
    Count = Len(text)
    For I = 1 To Count
    A = I * 8
    A = A + 24
    Showpic A , 40 , Setare
    Wait 1
    Next
    Return




    Spi_isr:



    Return

    دیدگاه


      #3
      پاسخ : خطاگرفتن بسکام برای کامپایل کردن lcd ks108

      با سلام
      بابا من اینجا توضیح دادم چطوری کدآ‌ها تون رو درست توی انجمن بنویسید چرا آخه این طوری کدها رو قرار میآ‌دید که نمیآ‌شه خواندشون؟؟
      http://www.eca.ir/forum2/index.php?topic=17442.0
      با تشکر فراوان از دوستان
      من دوست دارم آزاد فکر کنم، نرمآ‌افزارآ‌ و سختآ‌افزارهای آزاد را به کار ببرم و اگر توانستم نرمآ‌افزار، سختآ‌افزار و محتوای آزاد درست کنم!

      دیدگاه


        #4
        پاسخ : خطاگرفتن بسکام برای کامپایل کردن lcd ks108

        $regfile = "m8def.dat" ' specify the used micro
        $crystal = 8000000 ' used crystal frequency





        $lib "glcdKS108.lib"
        'First we define that we use a graphic LCD
        Config Graphlcd = 128 * 64sed , Dataport = Portd , Controlport = Portc , Ce = 1 , Cd = 2 , Rd = 3 , Reset = 4 , Enable = 5 , Mode = 8

        Lcdat 4 , 1 , "0123456789..."
        end
        زندگی یه فرصته

        دیدگاه


          #5
          پاسخ : خطاگرفتن بسکام برای کامپایل کردن lcd ks108

          سلام
          لطفا این سوال را در قسمت lcd مطرح کنید...

          این موضوع هم قفل میشه و بعد از چند روز پاک ..
          لطفا به لینک زیر بروید و سوالتون را در آنجا مطرح کنید.
          http://www.eca.ir/forum2/index.php?topic=18025.0

          قبلش پیشنهاد میکنم این مقاله رو بخونید(پیکر بندی که شما کردید اشتباه هستش :agree
          http://www.eca.ir/forum2/index.php?topic=16965.0
          متشکرم
          www.icesi.ir

          دیدگاه

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