Getrc5 in Arduino Uno no work

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    Aufgrund technischer Veränderungen ist der Mailverkehr innerhalb des Forums (Private Nachrichten) nur noch eingeschränkt möglich. Die Einschränkung ist notwendig, um zusätzliche Betriebskosten für das Forum zu vermeiden. Näheres zu den Hintergründen im Thread "Aktuelles zum Forum".Wir bitten um Verständnis.

    Hinweis kann nach Kenntnisnahme deaktiviert werden!

    • Getrc5 in Arduino Uno no work

      Hi programmers, can you please advise me why the Getrc5 command on Arduino Uno (Mega 328p) is not working for me. I am using Bascom 1.8 series. I uninstalled it and tried to compile with demo 2.0.7.9 + RC5.lib library (2.07.5).Still the same result = it only prints 255 + 127. If any of you have a working sample code, could you please send it to me (hex) by email (kokosovo@seznam.cz). Thank you for your help.
      '-------------------------------------------------------------------
      ' RC5.BAS
      '-------------------------------------------------------------------
      $regfile = "m328pdef.dat"
      $crystal = 16000000
      $hwstack = 40
      $swstack = 16
      $framesize = 32
      $baud = 19200

      Config Rc5 = Pind.2 , Wait = 2000
      Config Timer1 = Timer , Prescale = 1
      Enable Interrupts

      Dim Address As Byte , Command As Byte

      Print "Waiting for RC5..."

      Do
      Getrc5(address , Command)
      ' If Address = 0 Then Condition removed for better visibility
      Command = Command And &B01111111
      Print Address ; " " ; Command
      Waitms 200
      ' End If
      Loop
      End
    • Hi,
      yes, I'm sure the remote control sends a signal encoded RC5. See the serial monitor output of the sample program in "C IRremote.ino". But in C I can't program a bigger project like the one I have in Bascom... :(

      15:37:06.507 -> START C:\Users\Moje\Documents\Arduino\IRremote\IRremote.ino from Mar 4 2025
      15:37:06.554 -> Enabling IRin
      15:37:06.554 -> Ready to receive IR signals at pin 2
      15:37:15.820 -> Protocol=RC5 Data=0xD0C
      15:37:18.347 -> Protocol=RC5 Data=0x53F
      15:37:19.939 -> Protocol=RC5 Data=0xCBF
      15:37:21.623 -> Protocol=RC5 Data=0x47F
      15:37:26.444 -> Protocol=RC5 Data=0xC0D
      15:37:40.063 -> Protocol=RC5 Data=0x460
      or
      15:46:37.282 -> Protocol=NEC Data=0xFF10EF
      15:46:40.482 -> Protocol=NEC Data=0xFF4AB5
      15:46:43.402 -> Protocol=NEC Data=0xFF5AA5

      Mirek
    • Hi,
      at my end your program works. No surprise, as it is more or less copied from the help.
      So either there is a problem with your hardware or it is not RC5.
      Are you sure, that the receiver is connected to PinD.2 and that the controller is really running at 16MHz?
    • Hi,the same hardware on PinD.2 runs on Arduino Uno (original R3 under Arduino IDE 1.815) see above.Yesterday I ordered a new Bascom-AVR from MCS. I am waiting for the foreign payment to go through (supposedly 2-3 days) and then I will try it and get back to you. Thanks for your interest.

      And I apologize to everyone for the English, it is just a translator. Without it, I can only communicate in Czech, Slovak, Polish and a little Russian (yuck!). :)