RC5 code for infrared receiver


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Awesome :-)

    @Steve ...Seems like I am finally making some headway ..YAY

    Hey I recognize that code ... it's from 'Controlling the world from your armchair' aka article.pdf by Les Johnson :-)

    I tried it and it didn't work at the time .. I'm sure it's 'cos I had the wrong pulsin resolution and timing.

    Now if you look carefully at the previous posts you'll see mention of the RC5 protocol and here for a more detailed tech dive [HTML]http://www.sbprojects.com/knowledge/ir/rc5.htm[/HTML]

    Expert ...pffft..there are so many remote controllers out there :-) and so many different codes :-)

    Thanks for the extra info regarding PULSIN header checks by the way :-)

    Kind regards

    Dennis

  2. #2
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dennis View Post

    Hey I recognize that code ... it's from 'Controlling the world from your armchair' aka article.pdf by Les Johnson :-)
    Yep. Works great too.

    Now if you look carefully at the previous posts you'll see mention of the RC5 protocol and here for a more detailed tech dive [HTML]http://www.sbprojects.com/knowledge/ir/rc5.htm[/HTML]
    Thanks. I've read a bit about RC5... I just haven't used it for anything yet.

    Say, the other thing I'll mention is that if you use DT_interrupts (or probably any interrupts for that matter) you may want to turn them off just before the PULSIN command and turn 'em back on afterward. It took me an embarrassingly long amount of time to troubleshoot THAT problem...


    steve

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I posted an example here: http://www.picbasic.co.uk/forum/showthread.php?t=12555
    that makes learning IR button codes really easy. It uses a special capture module on the
    18F2431 that captures everything. High signal period, low signal period, and spits it all out
    to a serial terminal window. You can learn every button code on your remote in just a few
    minutes.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4


    Did you find this post helpful? Yes | No

    Default cool

    @Bruce - thanks for the cool tips nad the code there, I'm dying to try that as soon as I can source some 18F2431's..order placed but still waiting for them.
    Did you ever manage to get any reliable way prior to the CCP modules and the 18F2431 ?

    @Steve - thanks for the tip about interrupts I am not using any yet but weill heed the warning as soon as I do start with them :-)

    Kind regards

    Dennis

  5. #5
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    I posted an example here: http://www.picbasic.co.uk/forum/showthread.php?t=12555
    that makes learning IR button codes really easy. It uses a special capture module on the
    18F2431 that captures everything. High signal period, low signal period, and spits it all out
    to a serial terminal window. You can learn every button code on your remote in just a few
    minutes.
    Yeah... funny about that. Several days after you posted that some 18F2431's showed up in my mailbox. Just a coincidence? I think not.
    Haven't tried them yet. They're still sitting in their cute little black Microchip box.

    Thanks for all the good code Bruce!

    steve
    Last edited by Byte_Butcher; - 2nd March 2010 at 01:24.

  6. #6
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Last year I bought a device that plugs into a USB port and "reads" IR remotes.
    It shows quite a bit of info... carrier frequency, a visual of the code waveform with high and low times, how many carrier cycles, etc, as well as the button and device code numbers.
    It also has a pretty fair data base that recognizes various codes and tells you what format they are.

    Here's a screen shot of the output:
    http://www.weirdstuffwemake.com/swee...es/irscope.gif


    steve

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Did you ever manage to get any reliable way prior to the CCP modules and the 18F2431 ?
    Yeah - I used a USBee SX PC logic analyzer...;o) The 2431 approach is a lot faster, and gives me data I can print to text. I fiddled with one version that would even write PBP code for me to re-generate the same IR signals.

    Steve,

    Looks like a handy gadget. Should be pretty easy to write code with the data that spits-out.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8


    Did you find this post helpful? Yes | No

    Default The hard part about RC5....

    Steve - that does look like a nice gadget indeed :-)

    Bruce - sounds like you have been through a lot of work in efforts to decode the signals.

    @Anand ..that's a nice site :-)

    Unlike SONY protocol which has set pulse sizes for 1's and 0's ,
    I see the issue with decoding the RC5 protocol , it uses bi-phase encoding either a pulse on the first half of a total bit time (denoting a 0) OR the last half of a bit time (denoting a 1) so some code would be required to check the state of the pin.

    There must be some way to measure and capture this....back to the drawing boards I go :-(

    Any thoughts anyone ?

    Kind regards
    Dennis
    Last edited by Dennis; - 2nd March 2010 at 03:07.

  9. #9
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Byte_Butcher View Post
    Last year I bought a device that plugs into a USB port and "reads" IR remotes.
    It shows quite a bit of info...

    steve
    Steve, here's something similiar one can roll on one's own; works only on 'real' serial ports though (NOT USB-to-serial), found it quite useful in a few situations.

    http://www.laser.com/dante/

    Regards,

    Anand

Similar Threads

  1. PBP code to read R/C signal from receiver
    By malc-c in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 28th October 2009, 22:51
  2. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 22:55
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 22:31
  4. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  5. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts