RC5 Transmitter


Closed Thread
Results 1 to 7 of 7

Thread: RC5 Transmitter

  1. #1
    Join Date
    Feb 2005
    Posts
    2

    Default RC5 Transmitter

    Hi all!

    After trying to build RC5 InfraRed Transmitter for a week
    i'm quite frustrated.
    I'll be much obliged if anyone could help me with it.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Better are your chance to have an answer if you provide all the details

    code
    pic used
    schematic
    some beer
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Apr 2004
    Posts
    34


    Did you find this post helpful? Yes | No

    Default RC5 transmitter

    John,

    Have a look here: http://www.picbasic.nl/indexes_uk.htm
    It's the site from a guy who made some RC5 applications.
    The programs are written with Proton Plus so the timing, which is quite important in RC5, might not be correct.
    I tried some of the apps. with the PBP compiler and it didn't work.
    However when I tried a test version of Proton it worked.

    So remember timing issues are to be solved when using PBP.

    Regards,

  4. #4
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    I ripped the interesting parts from a working program. It transmits RC5 codes via an IRLED, modulation is 38.5kHz. Not exactly 38kHz but close enough. There are loads of information on the net regarding addresses, commands and all the rest you need to know about RC5.

    This link seems to cover just about all you need to know.
    http://info.fuw.edu.pl/~pablo/s/opis...dge/ir/rc5.htm

    Have fun.
    /Ingvar
    Code:
    DEFINE OSC 4
    
    SendIRword      VAR WORD
    SendIRcommand   VAR BYTE
    SendIRaddr      VAR BYTE
    SendIRtoggle    VAR BIT
    SendIRbit       VAR BIT
    Counter         VAR BYTE
    
    SendIRpin       VAR PortB.0 'connect IRLED via resistor to ground
    
    LOW SendIRpin
    
    
    
    Send_IR:
        SendIRword = %0000000000000110
        SendIRword = (SendIRword + SendIRtoggle) << 5
        SendIRword = (SendIRword + SendIRaddr) << 6
        SendIRword = (SendIRword + SendIRcommand)
        FOR bitcounter = 13 TO 0 STEP -1
            SendIRbit = ~(SendIRword.0(bitcounter))
            GOSUB ToggleSendPin
            SendIRbit = SendIRword.0(bitcounter)
            GOSUB ToggleSendPin
        NEXT
        SendIRpin = 0
        RETURN
    
    ToggleSendPin:
        IF SendIRbit THEN
            FOR Counter = 1 TO 34
                SendIRpin = 1
                ASM
                nop
                nop
                nop 
                nop
                nop
                nop
                nop
                nop 
                ENDASM        
                SendIRpin = 0
                ASM
                nop
                nop
                nop 
                nop
                nop
                nop
                nop
                nop 
                ENDASM                
            NEXT
        ELSE
            PAUSEUS 875
        ENDIF        
        RETURN

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jrt4fun
    John,

    I tried some of the apps. with the PBP compiler and it didn't work.
    However when I tried a test version of Proton it worked.

    So remember timing issues are to be solved when using PBP.

    Regards,
    TIP OF THE DAY: never trust anybody else than you
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    paramotor's Avatar
    paramotor Guest


    Did you find this post helpful? Yes | No

    Default

    assembly code for RC5 TX
    RC5 TX

  7. #7
    aloncha's Avatar
    aloncha Guest


    Did you find this post helpful? Yes | No

    Default

    Paramotor, could you send to me that RC5 TX code?
    [email protected]
    Thanks a lot!!!

Similar Threads

  1. RC5 code for infrared receiver
    By Dennis in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 11th January 2017, 12:34
  2. transmitter receiver help
    By Deorge M in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 11th June 2009, 07:17
  3. Replies: 1
    Last Post: - 9th February 2009, 22:40
  4. Replies: 23
    Last Post: - 23rd September 2008, 18:20
  5. RC5 decode on a 10F + Question
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th September 2008, 08:20

Members who have read this thread : 1

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