Presentation is loading. Please wait.

Presentation is loading. Please wait.

Communication Protocol

Similar presentations


Presentation on theme: "Communication Protocol"— Presentation transcript:

1 Communication Protocol
RC-5 Remote Control Communication Protocol (Optical - InfraRed)

2 Richard Anthony Smart Systems Technology
RC-5 Developed by Philips in 1980s as a consumer equipment (e.g. TV) infrared remote control communication protocol. Subsequently used by many European and US manufacturers of audio and video equipment, making it a de-facto standard for handheld remote controls. RC-5 provides versatile, one-way line-of-sight communication: A single command message is transmitted, modulated onto a carrier wave (see next slide) Speed – transmits at bit rate of 36KHz (carrier wave) Time to transmit command message is 24.9mS Command auto-repeats while button on handset is pressed (every 114mS) Typical range is 3 to 7 meters Richard Anthony Smart Systems Technology

3 Modulation of data bits in RC-5 code using 36KHz carrier wave
Richard Anthony Smart Systems Technology

4 36 KHz carrier wave with 25% to 33% duty cycle
Modulation of data bits in RC-5 code using 36KHz carrier wave (continued) 36 KHz carrier wave with 25% to 33% duty cycle 889 microsecond burst of carrier wave represents a high half-bit component No carrier wave for 889 microseconds represents a low half-bit component Richard Anthony Smart Systems Technology

5 A ‘1’ is coded as LOW half-bit followed by a HIGH half bit
Modulation of data bits in RC-5 code using 36KHz carrier wave (continued) A ‘1’ is coded as LOW half-bit followed by a HIGH half bit A ‘0’ is coded as HIGH half-bit followed by a LOW half bit All bits have a transition in the centre of the bit. This is a way to embed the clock within the data signal, and is described as ‘Self-Clocking data’ – the centre of each bit can be detected from the clock pulse and no additional clock signal is needed. Richard Anthony Smart Systems Technology

6 Richard Anthony Smart Systems Technology
Modulation of data bits in RC-5 code using 36KHz carrier wave (continued) Data is transmitted as a burst of 14 bits (each bit comprising a low half and a high half, and having a duration of milliseconds). The whole code is transmitted in 24.9 milliseconds. Richard Anthony Smart Systems Technology

7 Richard Anthony Smart Systems Technology
The command comprises 14 bits: Start bit (always logic 1) Field bit (extends ‘command’ to 7 bits – two sets of 6 bit vals) If ‘1’ the command value is in the lower field (0 to 63) If ‘0’ the command value is in the upper field (64 to 127) Note – in some systems this used as a second ‘Start bit’ (value in this case ‘1’) and does not contain application usable data Control bit, (alternates with each button press). Allows receiving device to distinguish between two successive button presses (such as "1", "1" for "11") as opposed to the user simply holding down the button and the repeating commands being interrupted by an obstacle (e.g. person moving in front of transmitter). 5-bit System address (selects from 32 systems, e.g. TV, DVD). 6-bit Command (7 bit if include field bit), selects one of the 64 (128) possible RC-5 commands – These are what actually control the behaviour of the application. Richard Anthony Smart Systems Technology

8 This marking is incorrect on some units
InfraRed receiver (RC5 command receiver, as in TV remote controls) InfraRed receiver A standard TV remote control handset is used as a transmitter This marking is incorrect on some units ATmega1281 sample application code uses PORT D bit 2 Uses Hardware Interrupt 2 to detect the start of the signal and PORTD bit 2 to read in the signal pulses. #define INPUT_PIN_MASK 0b If any modules do use bit 4, the code can easily be modified by changing to hardware Interrupt 4 and changing the input pin mask to #define INPUT_PIN_MASK 0b Richard Anthony Smart Systems Technology

9 Richard Anthony Smart Systems Technology
Sample code application (at the resources web page) A sample application has been provided to demonstrate how to use the RC-5 receiver. Operation: The code uses Timer2 to clock-in the carrier-wave pulses on port D bit 2. It periodically examines the bit value as the data pattern arrives. The code then interprets the pattern of ‘0’s and ‘1’s in the 14-bit message and detects the ‘command code’ part – this part is made available to the application logic (in the sample code it is just displayed onto the LEDs, connected to port B). The sample code example checks only the 6-bit command code value (it ignores the field bit and the 5 system bits) Richard Anthony Smart Systems Technology


Download ppt "Communication Protocol"

Similar presentations


Ads by Google