Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   



The Philips RC5 IR Remote Control ProtocolAuthor
Giorgos Lazaridis
July 30, 2012

PAGE 1 of 2 - The Philips RC5 and RC5-extended IR remote control protocol specifications


I plan to make some project(s) with infrared remote controls, so i had to get some experience with the various protocols. I chose to begin with the Philips RC5 protocol, because first it is a very popular protocol (not only for Philips devices) and second because i already own a Philips TV and a Philips DVD. I am aware that there are tons of information around the internet regarding this protocol, but my best way to learn something is to write a theory about it - Writing a theory page requires in-depth knowledge of the subject.



The RC5 Protocol specifications

Here are the specifications of the RC5 protocol as per the Philips datasheet:

Modulation type: Manchester code (bi-phase) - LOW to HIGH for ACE (1), HIGH to LOW for ZERO (0)
Carrier frequency: 36 KHz
Start bits: 1
Field bits: 1
Toggle bits: 1
Address bits: 5
Command bits: 6 or 7 (if RC5-extended)
Bit period (transmission clock): 1.778 mSec
Total signal duration: 24.892 mSec
Signal repetition interval: 100 mSec


Let's examine these bits one by one:

The Start bit (1)
This is the very first bit that is being transmitted. This bit is always 1 and initiates the receiving sequence.


The Field bit (1)
This bit has dual functionality. Normally, this is considered as a second start bit and it is always 1 as well, like the start bit. Later on Philips introduced the RC5 extended protocol when they realized that 64 commands (6-bits command length=64) are just not enough. To maintain compatibility with the original RC5 protocol they decided to use this bit for a 7th command bit. This way the RC5-extended protocol has 128 commands (7 bits). Care must be taken though with this bit. If it is used as the 7th command bit, it must be inverted!




The Toggle bit (1)
The toggle bit is a bit that it maintains the same as long as a key is pressed continuously, but if a key is released and is pressed back again (the same or a different key), the toggle bit is inverted. If for example you press the button "1" button and you keep it pressed, the remote control sends the RC5 protocol with 100mSec repetition interval, and all these repetitions have the same toggle bit (for example 1). Now suppose that you release the key and you press the same or another button. The next series of packets will be sent with the toggle bit inverted (0).
The reason for this bit is for the receiver to recognize the double-click from a long press. If for example you press button 1 twice (to switch to channel 11), the receiver will understand this from the toggle bit that will appear inverted the second time.

A list with the devices for the RC5 protocol
(Source:wikipedia)



The Address bits (5)
This set of 5 bits represent the device ID (address) that each remote control addresses to. This way, the operator can have more than one devices which use the RC5 protocol in the same room, without the remote control of the VCR for example to affect the TV. You can find a complete list of these devices in wikipedia.


The Command bits (6)
The last 6 bits carry the command to be executed. This can be for example a channel switch on the TV set, a volume up or down on the CD player, the power button on the VCR. Generally, these bits carry all the possible commands that the remote controls can have.



An RC5 transmission example
Let's see a typical transition with the RC5 protocol...



 



How to identify the aces and the zeros
Bit F and Bit T stands for the Field bit and the Toggle bit respectively. There are two very simple ways to recognize if a bit is 0 or 1. The first way is to identify the polarity switch in the middle of the bit transmission. In the previous example i have drown 14 thin red vertical lines to separate the bits. Notice that between two red lines, right in the middle, the bit changes polarity - It turns either from HIGH to LOW or from LOW to HIGH. If this change is LOW to HIGH, then the bit is an ACE, otherwise the bit is ZERO.

The other method is to see how the bit begins or ends. If the beginning of the bit is LOW, then this bit is 1 otherwise it is 1. The same but inverted stands for the bit-end. If the bit ends HIGH then this bit is 1, otherwise it is 0.



 





The Toggle bit - How it looks like?
The RC5 protocol is pretty straight forward, except of the toggle bit which can be sometimes be confusing. To understand how the toggle bit works, check out the following transmission timing charts:



 



Both transmissions have precisely the same address and data bits set. The only difference is the toggle bit. On the top transmission, the toggle bit is 1 while on the bottom it is 0. This shows that the button with the command number "001000" was pressed - released and pressed back again. - thus the toggle bit was inverted.

Continue to the next page to see a real-life example - i monitored the output of an RC5 compatible remote control with my oscilloscope.







Continue reading. Click here to go to the next page >>>.



Comments

  Name

  Email (shall not be published)

  Website

Notify me of new posts via email


Write your comments below:
BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.


      

  • At 29 July 2015, 11:32:11 user Kumar Satyam wrote:   [reply @ Kumar Satyam]
    • Bit period (transmission clock): 1,778 mSec

      should be corrected to:

      Bit period (transmission clock): 1.778 mSec


  • At 22 March 2014, 16:17:02 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @poonam 38KHz is the frequency (F). The period (T) is:

      T = 1/F => T = 1/38000 = 26,3 uSec


  • At 22 March 2014, 12:35:27 user poonam wrote:   [reply @ poonam]
    • nice xplination...sir but i have tsop1738 which is operated for 38KHZ frequency..can i knw the time period between each bit.We required that for our project automatic curtains..thanxx


  • At 15 August 2013, 9:11:07 user raushan wrote:   [reply @ raushan]
    • you are giving basic idea of the RC5 protocol in very simple and understable way , thanks for it .but sir now tell me how i interface with avr16 or any micro-controller


  • At 16 July 2013, 4:51:25 user Rohan wrote:   [reply @ Rohan]
    • good information is provided... thnx..


  • At 14 February 2013, 13:07:13 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @mary http://www.pcbheaven.com/userpages/philips_rc5_decoder_transmitter


  • At 11 February 2013, 3:04:21 user mary wrote:   [reply @ mary]
    • @Giorgos Lazaridis @Giorgos Lazaridis
      for the IR led have you connected 5v power supply as well as the ve teminal of dso TO the anode of IR led if im wrong plz tell me the connections


  • At 25 January 2013, 20:17:24 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @mary there is an application note on this chip datasheet


  • At 25 January 2013, 15:24:36 user mary wrote:   [reply @ mary]
    • i want to see the rc code on DSO but how do i connect the tsop with resistors & capcitors & plz tell me their values.2)im dong a prjt on remote ctrl of home aplliances using PHillips remote if i want to change the speed of fan which is one of the appliances what must i do.plzzzzzzz help


  • At 27 December 2012, 7:15:36 user JIRSHAD wrote:   [reply @ JIRSHAD]
    • Thank you for giving me a breakthrough in my project...!!!!!


  • At 26 October 2012, 15:14:46 user Alfredo Matignon wrote:   [reply @ Alfredo Matignon]
    • Excellent article and references. Thanks


  • At 4 September 2012, 20:48:27 user Sam Coleman wrote:   [reply @ Sam Coleman]
    • Very useful page. The bit period should read 1,778 uSec though.



    delicious
    digg
    reddit this Reddit this
    Faves



     HOT in heaven!


    NEW in heaven!



    New Theory: AC electric motor working principle



     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

    Site design: Giorgos Lazaridis
    © Copyright 2008
    Please read the Terms of services and the Privacy policy