اطلاعیه

Collapse
No announcement yet.

کمک برای استفاده از این ریموت

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

    کمک برای استفاده از این ریموت

    من می خوام از این ریموت داخل مدارم استفاده کنم ولی نمی دونم چطوری کدای ریموتو در بیارم و همین طور چطور استفاده کنم
    خیلی گشتم ولی چیز بدرد بخور پیدا نکردم :cry2: حالا ازتون کمک می خوام منو راهنمای کنید

    http://www.getchip.net/wp-content/uploads/37710c9bf06e.jpg

    #2
    پاسخ : کمک برای استفاده از این ریموت

    این کنترل ها با پروتکل ارتباطی مادون قرمز کار میکنن
    یا همون ir
    پروتکل های زیادی هست
    بعنوان مثال rc-5
    Rc-6
    Nec
    و...................
    این ریموت تا حالا باش کار نکردم که ببینم با چه پروتکلی
    کار میکنه
    ولی شما میتونید با ی اسکوپ یا لاجیک انالیزور
    خروجی پالس فرستنده ببینید
    وبا توجه به الگو های موجود برای پروتکل های مختلف تشخیص بدید از چه پروتکلی استفاده شده
    اگه خواستی یگو تا مدار گیرنده برات بزارم....

    دیدگاه


      #3
      پاسخ : کمک برای استفاده از این ریموت

      من هیچ کدوم از اسکوپ یا لاجیک انالیزور رو در اختیار ندارم راه دیگه ای نداره :cry2:

      دیدگاه


        #4
        پاسخ : کمک برای استفاده از این ریموت

        چرا با میکرو ولی مشکله یکم

        دیدگاه


          #5
          پاسخ : کمک برای استفاده از این ریموت

          یک چند تای پیدا کردم ولی خوب همی ریموت ها یکی نیستن


          $regfile = "m8def.dat"
          $crystal = 8000000
          $hwstack = 36
          $baud = 9600
          $swstack = 36
          $framesize = 40
          Config Portb.1 = Output
          Led Alias Portb.1
          Led = 1
          Config Timer0 = Timer , Prescale = 256 '8000000/256=31250 Hz
          Config Int1 = Falling 'Interruption on Falling
          Stop Timer0
          Enable Timer0
          Enable Int1
          Enable Interrupts
          On Timer0 Tikers 'work on timer
          On Int1 Infrared 'work on interruption

          Dim Got As Bit
          Dim Tik As Word
          Dim Send As Byte 'counter of teaks of timer
          Dim Byt As Byte 'counter accepted bit
          Dim Repeat_flag As Bit 'flag of repetition
          Dim Start_flag As Bit 'flag of start condition
          Dim Address_1 As Byte 'direct byte of address
          Dim Command_1 As Byte 'direct byte of command
          Dim Address_0 As Byte 'indirect byte of address
          Dim Command_0 As Byte 'indirect byte of command
          Dim Summa As Word
          Dim Address_nec As Byte , Command_nec As Byte 'Switch Off cursor
          '############################################ ################################################## ##################
          Do 'Main cycle
          If Got = 1 Then
          '-----------
          If Command_nec = 162 Then Print "CH-"
          If Command_nec = 98 Then Print "CH"
          If Command_nec = 226 Then Print "CH+"

          If Command_nec = 34 Then Print "BACK"
          If Command_nec = 2 Then Print "NEXT"
          If Command_nec = 194 Then Print "PLAY-STOP"

          If Command_nec = 224 Then Print "-"
          If Command_nec = 168 Then Print "+"
          If Command_nec = 144 Then Print "EQ"

          If Command_nec = 104 Then Print "0"
          If Command_nec = 152 Then Print "FOL-"
          If Command_nec = 176 Then Print "FOL+"

          If Command_nec = 48 Then Print "1"
          If Command_nec = 24 Then Print "2"
          If Command_nec = 122 Then Print "3"

          If Command_nec = 16 Then Print "4"
          If Command_nec = 56 Then Print "5"
          If Command_nec = 90 Then Print "6"

          If Command_nec = 66 Then Print "7"
          If Command_nec = 74 Then Print "8"
          If Command_nec = 82 Then Print "9"







          If Command_nec = 162 Then Print "CH-"
          If Command_nec = 98 Then Print "CH"
          If Command_nec = 226 Then Print "CH+"

          If Command_nec = 34 Then Print "BACK"
          If Command_nec = 2 Then Print "NEXT"
          If Command_nec = 194 Then Print "PLAY-STOP"

          If Command_nec = 224 Then Print "-"
          If Command_nec = 168 Then Print "+"
          If Command_nec = 144 Then Print "EQ"

          ' If Command_nec = 104 Then
          ' Send = 0
          ' Print Send
          ' End If
          If Command_nec = 152 Then Print "FOL-"
          If Command_nec = 176 Then Print "FOL+"

          If Command_nec = 48 Then
          Send = 1
          End If

          ' Print Send
          'If Command_nec = 24 Then
          'Send = 2
          'Print Send
          'End If
          'If Command_nec = 122 Then
          'Send = 3
          'Print Send
          'End If


          'If Command_nec = 16 Then
          'Send = 4
          'Print Send
          'End If

          'If Command_nec = 56 Then
          ' Send = 5
          ' Print Send
          'End If
          'If Command_nec = 90 Then
          ' Send = 6
          ' Print Send
          ' End If

          If Command_nec = 66 Then
          Send = 7
          Print Send
          End If
          If Command_nec = 74 Then
          Send = 8
          Print Send
          End If
          If Command_nec = 82 Then
          Send = 9
          Print Send
          End If


          Led = 0
          Waitms 50
          Led = 1
          Waitms 50

          Reset Got
          End If
          Waitms 10
          Loop
          End 'End of main cycle
          '############################################ ################################################## ##################
          Tikers: 'work on timer
          Timer0 = 253 '31250/(256-253)=10416,66 Hz (96 een)
          Incr Tik
          If Tik >= 1200 Then 'if 1200 teaks, have thrown all in source condition
          Tik = 0
          Repeat_flag = 0
          Start_flag = 0
          Address_1 = 255
          Command_1 = 255
          Address_0 = 0
          Command_0 = 0
          Address_nec = 255
          Command_nec = 255
          Stop Timer0
          End If
          Return
          '############################################ ################################################## ##################
          Infrared: 'work on interruption
          Start Timer0
          If Tik >= 139 And Tik < 150 Then 'if has happenned from 139 before 150 teaks - "START"
          Address_nec = 1
          Repeat_flag = 0
          Start_flag = 1
          Address_1 = 255
          Command_1 = 255
          Address_0 = 0
          Command_0 = 0
          End If
          If Tik >= 116 And Tik < 139 Then 'if has happenned from 116 before 138 teaks - "REPETITION"
          Address_nec = 0
          Repeat_flag = 1
          Start_flag = 0
          End If
          If Tik >= 22 And Tik < 116 And Start_flag = 1 Then 'if has happenned from 22 before 115 teaks - have taken "1"
          Incr Byt
          If Byt < 9 Then
          Shift Address_1 , Left
          Address_1 = Address_1 + 1
          End If
          If Byt >= 9 And Byt < 17 Then
          Shift Address_0 , Left
          Address_0 = Address_0 + 1
          End If
          If Byt >= 17 And Byt < 25 Then
          Shift Command_1 , Left
          Command_1 = Command_1 + 1
          End If
          If Byt >= 25 Then
          Shift Command_0 , Left
          Command_0 = Command_0 + 1
          End If
          End If
          If Tik >= 10 And Tik < 22 And Start_flag = 1 Then 'if has happenned from 10 before 21 teaks - have taken "0"
          Incr Byt
          If Byt < 9 Then
          Shift Address_1 , Left
          End If
          If Byt >= 9 And Byt < 17 Then
          Shift Address_0 , Left
          End If
          If Byt >= 17 And Byt < 25 Then
          Shift Command_1 , Left
          End If
          If Byt >= 25 Then
          Shift Command_0 , Left
          End If
          End If
          Tik = 0
          If Byt = 32 Then
          Address_nec = Address_1
          Command_nec = Command_1
          Set Got
          Address_1 = 255
          Command_1 = 255
          Byt = 0
          Repeat_flag = 0
          Start_flag = 0
          Stop Timer0
          End If
          Return

          دیدگاه


            #6
            پاسخ : کمک برای استفاده از این ریموت

            شما بیا ی تسنس بزن بیا مدار گیرنده که تو help بسکام هست ببنده و برنامه گیرنده روهم با توجه به توابع اماده بسکام

            بنویس

            تا اونجایی که میدونم rc5 و rc6 در بسکام پشتیبانی میشن

            با دو تاش تست کن ببین خروجی که میگیری با کدای سمت راست تصویر خودت برابر هست یا نه؟
            این کد ها کدهای خروجی از ریموت برای هر کلید باید باشه.. :read: :read: :read: :read:


            دیدگاه


              #7
              پاسخ : کمک برای استفاده از این ریموت

              ولی فکر کنم این ریموت با پروتوکل nec کار کنه نه rc5 و rc6 و من می خوام با necکار کنه مثل ریموت انواع پلیر ماشین

              دیدگاه

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