RC-5
RC-5 is an infrared (IR) remote control communication protocol developed by Philips in 1982 for use in consumer electronics such as televisions and VCRs.[1] It employs bi-phase (Manchester) encoding with a 36 kHz carrier frequency to transmit 14-bit messages, enabling reliable short-range wireless control of devices.[2][3] The protocol's message structure includes two start bits (always logic 1), a toggle bit that inverts with each button press to distinguish repeated commands, five address bits for device selection (supporting up to 32 unique systems), and six command bits for up to 64 functions per device.[2][3] Each bit has a duration of approximately 1.778 ms, resulting in a full message length of about 25 ms, with repetitions every 114 ms if a key is held.[2][4] Philips predefined standard addresses (e.g., 0x00 for TV, 0x05 for VCR) and commands (e.g., 0x0C for power on/off, 0x35 for play) to ensure interoperability across its product line and compatible third-party devices.[2] Widely adopted by European and North American manufacturers in the 1980s and 1990s, RC-5 became a de facto standard for audio-visual equipment due to its simplicity and low cost, powering remotes for TVs, stereos, and set-top boxes.[2][3] A variant called RC-5X reuses the second start bit as an inverted extension for a 7th command bit, supporting up to 128 commands in the same 14-bit format while maintaining backward compatibility.[2] Despite the rise of more advanced protocols like RC-6 and proprietary RF-based systems, RC-5 remains in use for legacy devices and hobbyist projects owing to the availability of inexpensive compatible remotes.[2][3] Its enduring legacy is evident in microcontroller libraries and IR receiver implementations from manufacturers like Microchip and STMicroelectronics.[3][4]History and Development
Origins
The RC-5 protocol was developed by Philips Electronics in the Netherlands in 1982 as a semi-proprietary infrared remote control communication protocol primarily intended for consumer electronics devices such as televisions and video cassette recorders.[1] It was first introduced with the Philips K12Z television in 1981/82.[1] This development occurred within Philips' consumer electronics division, though specific inventors or team members have not been publicly detailed in available technical literature.[5] The protocol's design aimed to establish a standardized, efficient method for infrared signaling tailored to Philips products, offering a European alternative to the NEC protocol, which dominated among Japanese manufacturers for similar applications.[6] The initial purpose of RC-5 was to enable reliable, low-complexity remote operation across Philips' lineup of home entertainment equipment, addressing the growing demand for wireless control in the consumer market without requiring extensive proprietary hardware modifications.[7] By employing bi-phase encoding on a 36 kHz carrier, it provided robustness against interference while supporting up to 2048 unique command combinations, sufficient for the era's device functionalities.[5] First public documentation of the RC-5 protocol emerged in mid-1980s Philips technical papers, including a detailed description titled "Description About The RC-5 Universal Infra-Red Remote-Control System" dated June 19, 1985, which outlined its structure and implementation guidelines for internal and partner use. This marked the protocol's formal introduction as a de facto standard within Philips' ecosystem, laying the groundwork for its broader European integration.Adoption
Following its development by Philips in 1982, the RC-5 protocol was rapidly integrated into the company's consumer electronics lineup, including televisions, VCRs, and audio equipment, by the mid-1980s.[8] This internal adoption leveraged the protocol's simple bi-phase encoding to enable reliable infrared communication for basic command transmission in home entertainment systems.[5] Philips licensed RC-5 to other European manufacturers, fostering broad compatibility across devices.[9] This proliferation established RC-5 as a de facto standard in Europe, where it powered a majority of infrared remotes in televisions and related appliances during the late 1980s and 1990s.[10] In contrast, the NEC protocol prevailed in Asia, driven by adoption among Japanese electronics firms like NEC and Sony, while RC-5 faced limited uptake in the broader U.S. market amid competition from proprietary standards.[11] By the 1990s, RC-5 evolved into a key component of universal remote controls, which incorporated support for the protocol alongside others like NEC and Sony SIRC to allow single-handset operation of multi-brand setups.[12] These devices capitalized on RC-5's addressable structure—supporting 32 system addresses and 64 commands each—to simplify user experience in increasingly complex home theaters.[13] Post-2000s, new RC-5 implementations waned as radio frequency (RF) and Bluetooth technologies offered greater range, multi-device pairing, and integration with smart home ecosystems, reducing reliance on line-of-sight infrared.[14] Nonetheless, RC-5 remains prevalent in legacy televisions, audio systems, and compatible universal remotes as of 2025, ensuring ongoing support for older equipment.[15]Protocol Fundamentals
Signal Characteristics
The RC-5 protocol utilizes infrared transmission with a standard carrier frequency of 36 kHz to modulate the signal, enabling reliable communication over short distances typical of remote control applications. Some implementations employ slight variations, such as 38 kHz or 40 kHz, to align with common infrared receiver sensitivities and improve compatibility across devices.[2][4] The signal is modulated using pulse-width modulation on the carrier, where bursts of the carrier occur during the "1" states of the bi-phase encoding scheme, with a duty cycle of 25% or 33% during active bursts to optimize transmitter power efficiency. The carrier is modulated as a square wave during these bursts, ensuring consistent detection by receivers designed for such patterns. The infrared emission is generated by light-emitting diodes (LEDs) with a peak wavelength of 940 nm, which falls within the near-infrared spectrum and minimizes visible light interference while maximizing transmission efficiency.[4][16] Each bit duration measures 1.778 ms, equivalent to 64 cycles of the 36 kHz carrier and corresponding to a bit rate of approximately 562.5 bits per second; this timing derives from scaling the carrier period such that a half-bit aligns with 32 cycles for precise bi-phase transitions. For a standard 14-bit message, the total transmission duration is approximately 24.889 ms. When a key is held continuously, the message repeats every 113.778 ms to sustain the command without redundant processing.[2][4]Bit Encoding
The RC-5 protocol employs Manchester encoding, also known as bi-phase coding, to represent binary data in a self-clocking manner that ensures reliable transmission over infrared signals. In this scheme, each bit is encoded with a mandatory transition at the midpoint of the bit period, distinguishing it from other line codes by embedding clock information directly within the data stream. A logic 0 is represented by a low-to-high transition at the center of the bit period, while a logic 1 is represented by a high-to-low transition.[5][17] The bit period in RC-5 is fixed at approximately 1.778 milliseconds, corresponding to a bit rate of about 562.5 bits per second, with the transition occurring precisely at t = \frac{\text{bit_time}}{2}. This timing is derived from a half-bit duration of 889 microseconds, during which the carrier is either on or off depending on the logic level. The encoding modulates a 36 kHz infrared carrier, where the presence of the carrier (a "pulse") typically inverts the signal polarity at the receiver, resulting in low voltage for carrier-on and high for carrier-off. For a logic 1, the carrier is off in the first half and on in the second half, producing a high-to-low transition; conversely, a logic 0 has the carrier on first and off second, yielding low-to-high.[4][3] Synchronization in RC-5 relies on the inherent transitions of the Manchester code, eliminating the need for a separate synchronization pulse and allowing the receiver to extract the clock from the data edges. The message frame begins with two start bits, both encoded as logic 1s, which generate two consecutive high-to-low transitions to alert the receiver and establish initial timing alignment. These start bits ensure frame detection without additional overhead, as the bi-phase nature prevents long runs of identical levels that could cause clock drift.[5][3] Following the start bits is the toggle bit, which is inverted with each new key press on the remote control to differentiate between initial commands and repetitions from a held button. If the key remains pressed, the toggle bit retains its value in subsequent transmissions (repeated every approximately 114 milliseconds), enabling the receiver to ignore duplicates while processing changes. This mechanism provides basic repeat detection without complex error-checking logic.[4][3] Error detection in RC-5 bit encoding stems from the properties of Manchester coding, which maintains a balanced signal with no direct current (DC) component, reducing susceptibility to baseline wander and noise-induced errors. However, the protocol includes no cyclic redundancy check (CRC) or parity bits; reliability depends on the receiver's precise timing recovery from mid-bit transitions and tolerance for minor variations in pulse widths (typically 640–1140 microseconds per half-bit). Receivers often implement fault detection by monitoring for expected edge arrivals within 1.25 bit periods or by validating the start sequence after idle periods exceeding 88 milliseconds.[4][3]Message Format
Standard RC-5 Structure
The standard RC-5 message format consists of a fixed 14-bit codeword, transmitted most significant bit (MSB) first.[7][3] The bits are structured as follows: bits 13 and 12 serve as start bits, both always set to logical 1 to synchronize the receiver; bit 11 is the toggle bit, which inverts its value with each new button press; bits 10 through 6 encode the 5-bit system address, supporting values from 0 to 31; and bits 5 through 0 encode the 6-bit command, supporting values from 0 to 63.[7][3] These bits are encoded using bi-phase (Manchester) modulation before transmission.[3] For repeated transmissions of the same command—such as during a button hold—the toggle bit remains unchanged across frames, which are sent at approximately 114 ms intervals, allowing the receiver to detect sustained presses without redundant processing.[7][3] The toggle bit inverts only upon a new or different command press, enabling the receiver to distinguish between initial and repeated actions.[7] This format limits the protocol to 32 possible systems and 64 commands per system, yielding a total of 2048 unique codes.[3] For instance, a TV power-on command might use system address 0 (binary 00000) and command 12 (binary 001100) with toggle bit 1, resulting in the full codeword binary 11100000001100.[7] All devices supporting the RC-5X extension maintain full backward compatibility with this standard 14-bit format, ensuring interoperability with original RC-5 remotes.[18]RC-5X Extension
The RC-5X protocol represents an extension of the original RC-5 infrared remote control standard, developed by Philips to accommodate devices requiring more than the 64 commands supported by the base protocol's 6-bit command field, such as early DVD players and other advanced consumer electronics. Introduced in the late 1990s, it maintains the core bi-phase (Manchester) encoding and 36 kHz carrier frequency of RC-5 while enhancing capacity without necessitating entirely new hardware designs.[2][18] In terms of structure, RC-5X reassigns the second start bit (S2) of the standard 14-bit RC-5 frame as the 7th command bit, effectively providing 7 bits for commands while preserving the single start bit, toggle bit, and 5-bit address fields. To enable detection of this extension by receivers, the duration of the second start bit position is stretched to two bit times (approximately 3.556 ms, compared to the standard 1.778 ms per bit), resulting in a total transmission length equivalent to 15 bit times. This modification allows RC-5X-capable decoders to recognize the extended format through the prolonged pulse in the S2 position, while the actual data bits follow the standard Manchester coding where a logical 1 is a high-to-low transition and a logical 0 is a low-to-high transition at the bit's midpoint.[2][18] This extension expands the command space to 128 unique codes per address (2^7), doubling the capacity of standard RC-5 and enabling finer control granularity for complex devices. The first 64 commands (values 0–63) remain identical to those in the base protocol, ensuring seamless interoperability; the additional commands occupy values 64–127, with the 7th bit derived by inverting the value placed in the S2 position to avoid confusion with standard start bits.[2][18] Backward compatibility is a key design feature: receivers not equipped for RC-5X interpret the stretched S2 as either an additional start bit or extraneous data and process only the first 14 bits as a standard RC-5 message, successfully handling the lower 64 commands without error. Transmitters supporting both modes can dynamically fall back to the original RC-5 format for broader device support, typically by omitting the extension and using a single start bit. This dual-mode capability minimizes disruption in mixed environments.[2][18] RC-5X found primary adoption in European set-top boxes, DVD players, and high-end audiovisual equipment starting around 2000, where the need for expanded command sets—such as menu navigation, chapter selection, and playback modes—outstripped the limits of the original protocol. Its use declined with the rise of more feature-rich successors like RC-6, but it remains implemented in legacy Philips and compatible systems for reliable, low-overhead control.[2] The extended transmission time for an RC-5X message is approximately 26.67 ms (15 bit times at 1.778 ms each), compared to 24.892 ms for standard RC-5, with repeats occurring every 114 ms while a key is held to prevent inadvertent multiple activations. This slight increase in duration supports the added functionality without significantly impacting responsiveness in typical remote control scenarios.[2][18]Addressing and Commands
System Address Allocation
The RC-5 protocol utilizes a 5-bit system address field within its message structure to specify the target device type, supporting 32 possible addresses ranging from 0 to 31. This allocation allows for selective control of multiple devices in a home entertainment setup, such as televisions, VCRs, and audio components, without interference. The standard assignment of these addresses was established by Philips in the early 1990s to promote interoperability among consumer electronics.[7][2] The following table outlines the standard device type assignments based on the Philips specification:| Decimal Address | Hex Address | Device Type |
|---|---|---|
| 0 | 0x00 | TV1 |
| 1 | 0x01 | TV2 |
| 2 | 0x02 | Teletext |
| 3 | 0x03 | Video |
| 4 | 0x04 | LV1 (LaserVision) |
| 5 | 0x05 | VCR1 |
| 6 | 0x06 | VCR2 |
| 7 | 0x07 | Experimental |
| 8 | 0x08 | Satellite 1 |
| 9 | 0x09 | Camera |
| 10 | 0x0A | Satellite 2 |
| 11 | 0x0B | Unspecified |
| 12 | 0x0C | CDV (CD Video) |
| 13 | 0x0D | Camcorder |
| 14 | 0x0E | Unspecified |
| 15 | 0x0F | Unspecified |
| 16 | 0x10 | Pre-amplifier |
| 17 | 0x11 | Tuner |
| 18 | 0x12 | Recorder 1 |
| 19 | 0x13 | Pre-amplifier 2 |
| 20 | 0x14 | CD Player |
| 21 | 0x15 | Phone |
| 22 | 0x16 | Satellite A |
| 23 | 0x17 | Recorder 2 |
| 24 | 0x18 | Unspecified |
| 25 | 0x19 | Unspecified |
| 26 | 0x1A | CDR (CD Recorder) |
| 27 | 0x1B | Unspecified |
| 28 | 0x1C | Unspecified |
| 29 | 0x1D | Lighting |
| 30 | 0x1E | Lighting |
| 31 | 0x1F | Unspecified |
Command Code Structure
The RC-5 protocol employs a 6-bit command field within its 14-bit message structure, enabling 64 distinct commands numbered from 0 to 63, which are executed based on the associated system address to control device-specific functions. These commands are largely standardized by Philips to promote interoperability among compatible consumer electronics, with many core operations—such as power control, volume adjustment, and channel selection—shared across device categories like televisions and VCRs, while playback and recording functions are tailored to video recorders. Command 0 typically serves no function or acts as a null operation, ensuring a baseline for unused codes.[2] Representative standard commands include power toggling or standby (command 12), which is common across TV, VCR, and satellite systems to switch devices on or off; the protocol's toggle bit (the control bit in the message) facilitates distinction between on and off states in some implementations by alternating on each press. Volume control uses command 16 for increase and 17 for decrease, applicable to audio functions in TVs and VCRs. For televisions, channel or program selection employs commands 32 (up) and 33 (down), while numeric input is handled by commands 0 through 9 for digits and 10 for special modes like step page or double-digit entry. In VCR systems, transport controls are assigned to command 50 (rewind), 53 (play), 54 (stop), and 55 (record), providing essential playback management. Mute or demute is standardized as command 13 across multiple categories.[19][2] The RC-5X extension modifies the protocol by reassigning the second start bit as an inverted 7th command bit, expanding the command space to 128 values (0-127) while preserving compatibility with the original 64 commands when the extension bit is zero. This allows for additional functionality in later devices, particularly for advanced features like menu navigation, teletext operations, and DVD-specific controls such as chapter skipping, angle selection (often in the 64-127 range), and subtitle toggling. For instance, higher commands enable interactions not covered in the base protocol, including display adjustments and system status queries. However, the original 1992 command allocations primarily addressed analog TV and VCR needs, lacking native support for digital formats like Blu-ray; modern extensions and equivalents are frequently derived from reverse-engineering Philips and compatible devices to accommodate evolving media players.[17][2]Implementation and Usage
Encoding and Transmission
The encoding and transmission of RC-5 signals involve generating a modulated infrared carrier wave using a microcontroller-driven circuit to emit pulses from an IR LED. The process begins with preparing the 14-bit message word, which includes start bits, a toggle bit, address, and command fields, followed by Manchester encoding where each bit features a transition in the middle of its 1.778 ms duration—rising for logic 1 and falling for logic 0.[5] The carrier is modulated at 36 kHz during the "high" periods of the Manchester signal, with a typical 25% duty cycle producing bursts of approximately 889 µs per half-bit.[5] For the hardware, a basic transmitter circuit uses an IR LED (e.g., 940 nm wavelength) connected in series with a current-limiting resistor, typically 100 Ω to limit peak current to around 50 mA when driven from a 5 V supply, and buffered by a transistor such as an NPN (e.g., 2N2222) to handle the LED's forward voltage drop of about 1.5 V.[20] The transistor base is driven via a 10 kΩ resistor from a microcontroller GPIO pin, ensuring the LED emits modulated IR pulses without overloading the MCU output.[5] This setup allows for reliable short-range transmission while minimizing power consumption. Microcontroller implementation relies on timers to generate the precise timings: one timer (e.g., TIM2 on STM8L10x) produces the 36 kHz carrier via PWM, while another (e.g., TIM3) handles the 889 µs interrupts for Manchester transitions, either through bit-banging on a GPIO or dedicated PWM modulation.[5] Bit-banging involves toggling the carrier enable signal mid-bit, whereas PWM can directly shape the envelope for efficiency on resource-constrained devices. In software, the flow starts by loading the 14-bit word into a buffer, then iterating through each bit to encode the Manchester pattern—modulating the carrier for the first half-bit and switching the transition while keeping the total bit time fixed at 1.778 ms.[5] The full frame transmission takes about 24.9 ms, after which an idle period follows before any repeats. Repeat handling ensures continuous transmission while a key is held: the initial message is sent once, followed by repeats every 114 ms without inverting the toggle bit, maintaining the same logical level to signal sustained input.[3] The effective range of RC-5 transmission is typically 5-10 meters in line-of-sight conditions, though it can be reduced by ambient light interference from sources like sunlight or fluorescent lamps, which introduce noise in the 940 nm band.[21] As of 2025, open-source libraries such as Arduino-IRremote simplify encoding and transmission by providing functions likesendRC5() to handle Manchester modulation and carrier generation on platforms like Arduino, supporting direct integration with GPIO or timer peripherals.[22]