اطلاعیه

Collapse
No announcement yet.

دفترچه یادداشت

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

    دفترچه یادداشت

    سلام
    من با استفاده از یه kbd وglcd یه دفترچه یادداشت خیلی ساده ساختم اما یه جائی به مشکل برخوردبرنامه سه قسمت داره : پاک کردن کل حافظه eeprom (دفترچه)/ یادداشت پیام / جستجوی پیام
    مشکل من تو قسمت جستجو هستش
    مثلا 4 تا پیام رو از خونه 0 حافظه ذخیره کردم(آدرس ها پشت سر هم هست و برای هر پیام 64 تا خونه حافظه رو اختصاص دادم)
    اما زمانیکه سرچ میکنم برنامه کار نمیکنه و یه سری کد اشتباه به جای پیام ذخیره شده برام نمایش میده و ضمنا سرچ به این صورت هستش که شماره پیام ذخیره شده باید وارد بشه مثلا اگر 1 را وارد کنم باید پیام شماره 1 نمایش داده بشه
    میشه لطفا راهنمائی بفرمائید
    مرسی

    $regfile = "m32def.dat" ' specify the used micro
    $crystal = 8000000 ' used crystal frequency
    $include "font8x8.font"

    $hwstack = 32 ' default use 32 for the hardware stack
    $swstack = 10 ' default use 10 for the SW stack
    $framesize = 40 ' default use 40 for the frame space


    'some routines to control the display are in the glcdKS108.lib file
    $lib "glcdKS108.lib"
    'First we define that we use a graphic LCD
    Config Graphlcd = 128 * 64sed , Dataport = Portb , Controlport = Portd , Ce = 4 , Ce2 = 3 , Cd = 2 , Rd = 1 , Reset = 5 , Enable = 0
    'Config Graphlcd = 128 * 64sed , Dataport = Portb , Controlport = Porta , Ce = 4 , Ce2 = 3 , Cd = 0 , Rd = 1 , Reset = 5 , Enable = 2
    'Mishod Payeh Shomareh 5 Ra Braye Reser Entekhab ****m - Man Shomareh 6 Ra Gharar Dadam Va Reset Lcd Ra Mostaghim Be Vcc Vasl Kardam.

    'The dataport is the portname that is connected to the data lines of the LCD
    'The controlport is the portname which pins are used to control the lcd
    'CE =CS1 Chip select
    'CE2=CS2 Chip select second chip
    'CD=Data/instruction
    'RD=Read
    'RESET = reset
    'ENABLE= Chip Enable

    'specify the font we want to use

    Setfont Font8x8


    Config Kbd = Portc , Debounce = 20 [ , Delay = 100]
    Config Timer1 = Timer , Prescale = 8
    Stop Timer1
    Enable Interrupts
    Enable Ovf1
    On Ovf1 Ovf1routin
    Dim X As Byte
    Dim Y As Byte
    Dim A As Word
    Dim B As Word
    Dim Data_show As Word
    Dim Key As Byte
    Dim Column As Byte , Row As Byte
    Dim Eepra As Integer
    Dim Eeprd As Byte
    Dim Counter_1 As Byte
    Dim Lookds As Byte
    Dim Nme As String * 64
    Dim Nme_s As String * 64
    Dim Data_1 As Byte
    Dim Char_c As Byte
    Dim D_save As Byte
    Dim Last_a As Eram Integer At 1
    Last_a = 0


    Main:

    Cls Graph
    Lcdat 1 , 1 , " Tel_NoteBook "
    Lcdat 3 , 1 , "New message=1"
    Lcdat 5 , 1 , "Clear all=2"
    Lcdat 7 , 1 , "Search=3"

    Loop_main:
    Do
    Key = Getkbd()
    If Key < 16 Then Key = Lookup(key , Data_key)
    If Key = 0 Then : Goto Sub_newname : End If
    If Key = 1 Then : Goto Sub_clear : End If
    If Key = 2 Then : Goto Sub_search : End If
    Waitms 100
    Goto Loop_main
    Loop

    '-------------------------------------------
    ' Memory Clear
    '-------------------------------------------
    Sub_clear:

    Cls Graph
    Lcdat 1 , 1 , "Are you sure"
    Lcdat 3 , 1 , "clear all data ?"
    Lcdat 7 , 1 , "OK=F1 Cancel=F2"
    Wait 2

    Clear_w1:

    Key = Getkbd()
    If Key < 16 Then Key = Lookup(key , Data_key)
    If Key = 15 Then : Goto Main : End If 'Press Menue Button
    If Key = 7 Then : Goto Main : End If 'Press Cancel button
    If Key = 3 Then 'Press OK Button
    Cls Graph
    Lcdat 1 , 1 , "Please wait..."
    Lcdat 3 , 1 , "Deleting memory"

    Eeprd = 0
    For Eepra = 0 To 1023
    Writeeeprom Eeprd , Eepra
    Next Eepra
    'Last_a = 10
    'Total_n = 0
    Cls Graph
    'LCDAT Y , COL, value
    Lcdat 1 , 1 , "Memory Empty"
    Wait 3
    Goto Main
    End If

    Goto Clear_w1

    '-------------------------------------------
    ' Save New Number
    '-------------------------------------------

    Sub_newname:

    Cls Graph
    Lcdat 1 , 1 , "type message :"
    Wait 1
    Cls
    D_save = 0
    Column = 1
    Nme = " "
    Wait 1

    Noname:

    Stop Timer1
    Timer1 = 0
    Counter_1 = 0
    Lookds = 0
    If D_save = 1 Then : Goto Data_save : End If
    Key = Getkbd()
    If Key < 16 Then Key = Lookup(key , Data_key)
    If Key > 15 Then : Goto Noname : End If

    New_char:

    Start Timer1
    If Key = 15 Then : Stop Timer1 : Goto Main : End If 'Press Menue Button
    If Key = 7 Then : Stop Timer1 : Goto Main : End If 'Press Cancel Button
    If Key = 3 Then : D_save = 1 : Goto Noname : End If 'Press Ok Button
    If Key = 12 Then : Goto Noname : End If 'Press * key
    If Key = 14 Then : Goto Noname : End If 'Press # key

    If Key = 11 Then
    Stop Timer1
    Timer1 = 0
    Counter_1 = 0
    Decr Column
    Data_1 = " "
    Mid(nme , Column , 1) = Data_1
    Lcdat 3 , 1 , Nme
    If Column = 0 Then
    Nme = " "
    Column = 1
    End If

    Waitms 300
    Goto Noname
    End If

    If Lookds = 0 Then : Data_1 = Lookupstr(key , Sdata_0) : End If
    If Lookds = 1 Then : Data_1 = Lookupstr(key , Sdata_1) : End If
    If Lookds = 2 Then : Data_1 = Lookupstr(key , Sdata_2) : End If
    If Lookds = 3 Then : Data_1 = Lookupstr(key , Sdata_3) : End If
    If Lookds = 4 Then : Data_1 = Lookupstr(key , Sdata_4) : End If


    Mid(nme , Column , 1) = Data_1
    Lcdat 3 , 1 , Nme

    Incr Lookds
    If Lookds = 5 Then : Lookds = 0 : End If
    Waitms 200

    Save_w1:

    Key = Getkbd()
    If Key < 16 Then Key = Lookup(key , Data_key)

    If Counter_1 >= 10 Then
    Incr Column

    Goto Noname
    End If

    If Key < 16 Then
    Stop Timer1
    Timer1 = 0
    Counter_1 = 0
    Goto New_char
    End If

    Goto Save_w1

    '--------------------------------------------------


    Data_save:

    Eepra = Last_a

    Writeeeprom Nme , Eepra

    Eepra = Eepra + 64

    Last_a = Eepra

    Cls Graph
    Lcdat 1 , 1 , "message Saved"

    Wait 2

    Goto Main

    '--------------------------------------------------
    ' Search
    '--------------------------------------------------

    Sub_search:

    Cls Graph
    Lcdat 1 , 1 , "Enter Number:"
    Wait 1
    Cls
    Noname_s:

    Key = Getkbd()
    If Key < 16 Then Key = Lookup(key , Data_key)
    If Key > 15 Then : Goto Noname_s : End If

    New_char_s:

    Start Timer1
    If Key = 15 Then : Stop Timer1 : Goto Main : End If 'Press Menue Button
    If Key = 7 Then : Stop Timer1 : Goto Main : End If 'Press Cancel Button
    If Key = 3 Then : D_save = 1 : Goto S_search : End If 'Press Ok Button
    If Key = 12 Then : Goto Noname_s : End If 'Press * key
    If Key = 14 Then : Goto Noname_s : End If 'Press # key

    S_search:
    Cls
    Select Case Key
    Case 0:

    For B = 0 To 64

    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next
    Case 1:

    For B = 65 To 129

    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next
    Case 2:

    For B = 130 To 194

    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next
    Case 3:

    For B = 195 To 259

    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next
    Case 4:

    For B = 260 To 324
    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next
    Case 5:

    For B = 325 To 389
    If X >= 128 Then
    X = 0
    Y = Y + 8
    End If
    Readeeprom Data_show , B
    Lcdat Y , X , Data_show

    X = X + 8
    Next

    Case Else:
    Cls
    Lcdat 1 , 1 , " I'm Sorry"
    Lcdat 2 , 3 , " Message "
    Lcdat 3 , 3 , " Not Found"
    End Select
    Wait 5

    Goto Main

    End 'end program




    Ovf1routin:
    Incr Counter_1
    Return

    Data_key:
    Data 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15


    Sdata_0:
    Data "1" , "2" , "3" , "A" , "4" , "5" , "6" , "B" , "7" , "8" , "9" , "C"_
    , "*" , "0" , "#" , "D"

    Sdata_1:
    Data "." , "a" , "d" , "A" , "g" , "j" , "m" , "B" , "p" , "t" , "w" , "C"_
    , "+" , " " , "(" , "D"

    Sdata_2:
    Data "," , "b" , "e" , "A" , "h" , "k" , "n" , "B" , "q" , "u" , "x" , "C"_
    , "-" , "@" , &quot" , "D"

    Sdata_3:
    Data "?" , "c" , "f" , "A" , "i" , "l" , "o" , "B" , "r" , "v" , "y" , "C"_
    , "/" , "$" , "%" , "D"

    Sdata_4:
    Data "!" , "2" , "3" , "A" , "4" , "5" , "6" , "B" , "s" , "8" , "z" , "C"_
    , "\" , "^" , "~" , "&" , "D
    "
    http://www.ecapic.ir/image/ECA-090927112544.png

    #2
    پاسخ : دفترچه یادداشت(درخواست کمک فوری)

    من واقعا به راهنمائیتتون احتیاج دارم :sad:
    http://www.ecapic.ir/image/ECA-090927112544.png

    دیدگاه


      #3
      پاسخ : دفترچه یادداشت(درخواست کمک فوری)

      سلام

      یه شماتیکی ازش تو proteus بساز که بشه simulate کرد تا سریع اشکالو پیدا کرد
      http://ceworld.ir/images/ads/dornablogcom_ads.gif

      دیدگاه


        #4
        پاسخ : دفترچه یادداشت(درخواست کمک فوری)

        نمیتونی با C کار کنی؟

        2 روزه ردیف میشه
        خدا گفت : به جهنم ببریدش، او برگشت و با تعجب به خدا نگاه کرد. خدا گفت : به بهشت ببریدش. فرشتگان پرسیدند: چرا؟! خدا گفت : او هنوز به من امیدوار است...

        دیدگاه


          #5
          پاسخ : دفترچه یادداشت(درخواست کمک فوری)

          سلام ،
          فکر میکنم بهتر باشه شما اول مقادیری رو که می خونید بریزید روی رشته و بعد رشته رو چاپ کنید ( می تونید رشته رو به صورت سریال بفرستید و اونجوری هم تست کنید ) ، یک تاخیر هم بعد از خوندن از e2prom بزارید

          برای تست طول پیام رو کم کنید ، تا راحت بتونید محتویات رو چک کنید
          می تونید ، بعد از این که پیغام ذخیره شد ، با پروگرامر کدهای eeprom رو بخونید ، و ببینید همون های نوشتید داخل eeprom همون ها ذخیره شدند ؟

          وقفه رو هم برای اطمینان در هنگام خواندن غیرفعال کنید

          :redface:

          دیدگاه


            #6
            پاسخ : دفترچه یادداشت(درخواست کمک فوری)

            سلام
            من از بسکام بدم میاد. ولی عیب قسمت delete اینه که :

            For Eepra = 0 To 1023
            Writeeeprom Eeprd , Eepra
            Next Eepra

            شما اعداد 0 تا 1023 رو در خانه های 0 تا 1023 ذخیره میکنید. این رو میشه عیب تلقی نکرد. ولی بهتره تمام این فظا رو با کد اسپیس یا صفر پر کنید.

            پایین ترش :
            حدس من اینه که بسکام آرایه رو یکجا برای ذخیره نگیره و شما دارید آدرس آرایه رو با دستور :
            Writeeeprom Nme , Eepra
            ذخیره میکنید نه محتواش رو.

            برای همچین برنامه ای اول باید ماژول ها رو جدا بنویسید و تست کنید.
            یه برنامه بنویسید که یه آرایه مثل "Bascom is bad" رو تو eeprom بنویسه و دوباره بخونه و نمایش بده. ببینید با این روش شما عمل میکنه یا نه.
            بت در بغل و به سجده پیشانی ما کافر زده خنده بر مسلمانی ما
            اسلام به ذات خود ندارد عیبی هر عیب که هست در این مسلمانی ماست

            دیدگاه


              #7
              پاسخ : دفترچه یادداشت

              سلام
              با تشکر از راهنمائی تمام اساتید
              برنامه رو نوشتم و رو سخت افزارم جواب گرفتم
              خدمت دوستان شاید احیانا به دردشون خورد
              البته به جای شماره پیام باید اسم و عنوان پیام رو وارد کنند
              :redface:
              $regfile = "m32def.dat" ' specify the used micro
              $crystal = 8000000 ' used crystal frequency
              $include "font8x8.font"

              $hwstack = 32 ' default use 32 for the hardware stack
              $swstack = 10 ' default use 10 for the SW stack
              $framesize = 40 ' default use 40 for the frame space


              'some routines to control the display are in the glcdKS108.lib file
              $lib "glcdKS108.lib"
              'First we define that we use a graphic LCD
              Config Graphlcd = 128 * 64sed , Dataport = Portb , Controlport = Portd , Ce = 4 , Ce2 = 3 , Cd = 2 , Rd = 1 , Reset = 5 , Enable = 0
              'The dataport is the portname that is connected to the data lines of the LCD
              'The controlport is the portname which pins are used to control the lcd
              'CE =CS1 Chip select
              'CE2=CS2 Chip select second chip
              'CD=Data/instruction
              'RD=Read
              'RESET = reset
              'ENABLE= Chip Enable

              'specify the font we want to use

              Setfont Font8x8


              Config Kbd = Portc , Debounce = 20 [ , Delay = 100]
              Config Timer1 = Timer , Prescale = 8
              Stop Timer1
              Enable Interrupts
              Enable Ovf1
              On Ovf1 Ovf1routin

              Dim Key As Byte
              Dim Column As Byte , Row As Byte
              Dim Eepra As Integer
              Dim Eeprd As Byte
              Dim Counter_1 As Byte
              Dim Lookds As Byte
              Dim Number As String * 19
              Dim Nme As String * 19
              Dim Nme2 As String * 19
              Dim Nme_s As String * 19
              Dim Data_1 As Byte
              Dim Char_c As Byte
              Dim D_save As Byte
              Dim Temp1 As Byte
              Dim Total_n As Eram Byte At 0
              Dim Last_a As Eram Integer At 1
              Last_a = 10
              Total_n = 0

              Showpic 1 , 1 , Pic1
              Wait 1
              Cls
              Main:

              Cls


              Lcdat 1 , 1 , " NoteBook "
              Lcdat 3 , 1 , "New message=1"
              Lcdat 5 , 1 , "Clear all=2"
              Lcdat 7 , 1 , "Search=3"

              Loop_main:
              Do
              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)

              If Key = 0 Then : Goto Sub_newname : End If
              If Key = 1 Then : Goto Sub_clear : End If
              If Key = 2 Then : Goto Sub_search : End If

              Waitms 100
              Goto Loop_main
              Loop

              '-------------------------------------------
              ' Memory Clear
              '-------------------------------------------
              Sub_clear:

              Cls Graph
              'LCDAT Y , COL, value
              Lcdat 1 , 1 , "Are you sure"
              Lcdat 3 , 1 , "clear all data ?"
              Lcdat 7 , 1 , "OK=F1 Cancel=F2"
              Wait 2

              Clear_w1:

              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)

              If Key = 15 Then : Goto Main : End If 'Press Menue Button
              If Key = 7 Then : Goto Main : End If 'Press Cancel button
              If Key = 3 Then 'Press OK Button
              Cls
              Lcdat 1 , 1 , "Please wait..."
              Lcdat 3 , 1 , "Deleting message"

              Eeprd = 0
              For Eepra = 0 To 1023
              Writeeeprom Eeprd , Eepra
              Next Eepra
              Last_a = 10
              Total_n = 0
              Cls
              Lcdat 1 , 1 , "Memory Empty"
              Wait 3
              Goto Main
              End If

              Goto Clear_w1

              '-------------------------------------------
              ' Save New message
              '-------------------------------------------

              Sub_newname:

              Cls
              Lcdat 1 , 1 , "Enter Name :"
              D_save = 0
              Column = 1
              Nme = " "
              Wait 1

              Noname:

              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Lookds = 0
              If D_save = 1 Or Column = 17 Then : Goto Sub_newname2 : End If
              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)
              If Key > 15 Then : Goto Noname : End If

              New_char:

              Start Timer1
              If Key = 15 Then : Stop Timer1 : Goto Main : End If 'Press Menue Button
              If Key = 7 Then : Stop Timer1 : Goto Main : End If 'Press Cancel Button
              If Key = 3 Then : D_save = 1 : Goto Noname : End If 'Press Ok Button
              If Key = 12 Then : Goto Noname : End If 'Press * key
              If Key = 14 Then : Goto Noname : End If 'Press # key

              If Key = 11 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Decr Column
              Data_1 = " "
              Mid(nme , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme
              If Column = 0 Then
              Nme = " "
              Column = 1
              End If
              Waitms 300
              Goto Noname
              End If

              If Lookds = 0 Then : Data_1 = Lookupstr(key , Sdata_0) : End If
              If Lookds = 1 Then : Data_1 = Lookupstr(key , Sdata_1) : End If
              If Lookds = 2 Then : Data_1 = Lookupstr(key , Sdata_2) : End If
              If Lookds = 3 Then : Data_1 = Lookupstr(key , Sdata_3) : End If
              If Lookds = 4 Then : Data_1 = Lookupstr(key , Sdata_4) : End If


              Mid(nme , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme

              Incr Lookds
              If Lookds = 5 Then : Lookds = 0 : End If
              Waitms 200

              Save_w1:

              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)

              If Counter_1 >= 10 Then
              Incr Column
              Goto Noname
              End If

              If Key < 16 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Goto New_char
              End If

              Goto Save_w1
              '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

              Sub_newname2:

              Cls Graph
              Lcdat 1 , 1 , "Enter mesage :"
              D_save = 0
              Column = 1
              Nme2 = " "
              Wait 1

              Noname2:

              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Lookds = 0
              If D_save = 1 Or Column = 50 Then : Goto Data_save : End If
              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)
              If Key > 15 Then : Goto Noname2 : End If

              New_char2:

              Start Timer1
              If Key = 15 Then : Stop Timer1 : Goto Main : End If 'Press Menue Button
              If Key = 7 Then : Stop Timer1 : Goto Main : End If 'Press Cancel Button
              If Key = 3 Then : D_save = 1 : Goto Noname2 : End If 'Press Ok Button
              If Key = 12 Then : Goto Noname2 : End If 'Press * key
              If Key = 14 Then : Goto Noname2 : End If 'Press # key

              If Key = 11 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Decr Column
              Data_1 = " "
              Mid(nme2 , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme2
              If Column = 0 Then
              Nme2 = " "
              Column = 1
              End If
              Waitms 300
              Goto Noname2
              End If

              If Lookds = 0 Then : Data_1 = Lookupstr(key , Sdata_0) : End If
              If Lookds = 1 Then : Data_1 = Lookupstr(key , Sdata_1) : End If
              If Lookds = 2 Then : Data_1 = Lookupstr(key , Sdata_2) : End If
              If Lookds = 3 Then : Data_1 = Lookupstr(key , Sdata_3) : End If
              If Lookds = 4 Then : Data_1 = Lookupstr(key , Sdata_4) : End If


              Mid(nme2 , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme2

              Incr Lookds
              If Lookds = 5 Then : Lookds = 0 : End If
              Waitms 200

              Save_w12:

              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)

              If Counter_1 >= 10 Then
              Incr Column
              Goto Noname2
              End If

              If Key < 16 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Goto New_char2
              End If

              Goto Save_w12
              '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
              '--------------------------------------------------


              Data_save:

              Eepra = Last_a

              Writeeeprom Nme , Eepra

              Eepra = Eepra + 20

              Writeeeprom Nme2 , Eepra

              Eepra = Last_a + 40

              Last_a = Eepra

              Temp1 = Total_n + 1

              Total_n = Temp1

              Cls
              Lcdat 1 , 1 , "message Saved"

              Wait 2

              Goto Main

              '--------------------------------------------------
              ' Search
              '--------------------------------------------------

              Sub_search:

              Cls Graph
              'LCDAT Y , COL, value
              Lcdat 1 , 1 , "Enter Name:"
              Column = 1
              D_save = 0
              Nme_s = " "
              Wait 1

              Noname_s:

              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Lookds = 0
              If D_save = 1 Or Column = 17 Then : Goto Data_save : End If
              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)
              If Key > 15 Then : Goto Noname_s : End If

              New_char_s:

              Start Timer1
              If Key = 15 Then : Stop Timer1 : Goto Main : End If 'Press Menue Button
              If Key = 7 Then : Stop Timer1 : Goto Main : End If 'Press Cancel Button
              If Key = 3 Then : D_save = 1 : Goto S_search : End If 'Press Ok Button
              If Key = 12 Then : Goto Noname_s : End If 'Press * key
              If Key = 14 Then : Goto Noname_s : End If 'Press # key


              If Key = 11 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Decr Column
              Data_1 = " "
              Mid(nme_s , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme_s
              If Column = 0 Then
              Nme = " "
              Column = 1
              End If
              Waitms 300
              Goto Noname_s
              End If


              If Lookds = 0 Then : Data_1 = Lookupstr(key , Sdata_0) : End If
              If Lookds = 1 Then : Data_1 = Lookupstr(key , Sdata_1) : End If
              If Lookds = 2 Then : Data_1 = Lookupstr(key , Sdata_2) : End If
              If Lookds = 3 Then : Data_1 = Lookupstr(key , Sdata_3) : End If
              If Lookds = 4 Then : Data_1 = Lookupstr(key , Sdata_4) : End If


              Mid(nme_s , Column , 1) = Data_1
              Lcdat 3 , 1 , Nme_s

              Incr Lookds
              If Lookds = 5 Then : Lookds = 0 : End If
              Waitms 200

              Search_w1:

              Key = Getkbd()
              If Key < 16 Then Key = Lookup(key , Data_key)

              If Counter_1 >= 10 Then
              Incr Column
              Goto Noname_s
              End If

              If Key < 16 Then
              Stop Timer1
              Timer1 = 0
              Counter_1 = 0
              Goto New_char_s
              End If

              Goto Search_w1


              S_search:

              Cls Graph

              Lcdat 1 , 1 , "Searching..."

              Eepra = 10

              For Temp1 = 1 To Total_n

              For Column = 1 To 16
              Readeeprom Data_1 , Eepra
              Mid(nme , Column , 1) = Data_1
              Incr Eepra
              Next Column

              Eepra = Eepra + 24
              Data_1 = Instr(1 , Nme , Nme_s)

              If Data_1 = 1 Then
              Eepra = Eepra - 20
              For Column = 1 To 16
              Readeeprom Data_1 , Eepra
              Mid(nme2 , Column , 1) = Data_1
              Incr Eepra
              Next Column
              Cls Graph
              Lcdat 1 , 1 , "Name:"
              Lcdat 3 , 1 , Nme_s
              Lcdat 5 , 1 , "message:"
              Lcdat 7 , 1 , Nme2
              Wait 5
              Goto Main
              End If

              Next Temp1

              Cls Graph

              Lcdat 1 , 1 , " I'm Sorry"
              Lcdat 2 , 1 , "message Not Found"

              Wait 5

              Goto Main

              End 'end program
              Pic1:
              $bgf "pic1.bgf"



              Ovf1routin:
              Incr Counter_1
              Return

              Data_key:
              Data 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15


              Sdata_0:
              Data "1" , "2" , "3" , "A" , "4" , "5" , "6" , "B" , "7" , "8" , "9" , "C"_
              , "*" , "0" , "#" , "D"

              Sdata_1:
              Data "." , "a" , "d" , "A" , "g" , "j" , "m" , "B" , "p" , "t" , "w" , "C"_
              , "+" , " " , "(" , "D"

              Sdata_2:
              Data "," , "b" , "e" , "A" , "h" , "k" , "n" , "B" , "q" , "u" , "x" , "C"_
              , "-" , "@" , &quot" , "D"

              Sdata_3:
              Data "?" , "c" , "f" , "A" , "i" , "l" , "o" , "B" , "r" , "v" , "y" , "C"_
              , "/" , "$" , "%" , "D"

              Sdata_4:
              Data "!" , "2" , "3" , "A" , "4" , "5" , "6" , "B" , "s" , "8" , "z" , "C"_
              , "\" , "^" , "~" , "&" , "D"
              http://www.ecapic.ir/image/ECA-090927112544.png

              دیدگاه

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