IR Protocols & Codes

The encoding standards that make infrared remote control possible — NEC, Sony SIRC, Philips RC5/RC6, Samsung, and more.

Period1980-Present

NEC Protocol

The NEC protocol is the most widely used IR encoding standard, developed by NEC in 1980. It is used by the vast majority of Asian-manufactured consumer electronics including TVs, DVD players, air conditioners, and set-top boxes.

  • Carrier: 38kHz
  • Bits: 32 (8-bit address + 8-bit address inverse + 8-bit command + 8-bit command inverse)
  • Encoding: Pulse distance — 562.5μs burst, 562.5μs space = "0", 562.5μs burst, 1687.5μs space = "1"
  • Address: 8-bit device address (0-255), sometimes extended to 16-bit
  • Repeat: 9ms leader + 2.25ms space (no data) sent every 108ms

NEC Key Codes by Manufacturer

ManufacturerDeviceAddressPowerVol+Vol-Ch+Ch-
LGTV0x040x080x020x030x000x01
LGDVD0x070x080x020x030x000x01
SamsungTV (alternate)0x070x020x070x0B0x120x10
HisenseTV0x000x120x020x030x000x01
TCLTV0x040x080x020x030x000x01
VizioTV0x040x080x020x030x000x01
SonyAV Receiver0x060x120x120x130x100x11

Sony SIRC Protocol

Sony's proprietary IR protocol, used exclusively on Sony TVs, projectors, and AV equipment. Unlike NEC, SIRC uses pulse width encoding and has a distinctive 20-bit format.

  • Carrier: 40kHz (not 38kHz)
  • Bits: 12 or 20 (5-bit address + 7-bit command, extended to 20-bit)
  • Encoding: Pulse width — 600μs = "0", 1200μs = "1"
  • Leader: 2400μs burst + 600μs space

Sony SIRC Key Codes

DeviceAddressPowerVol+Vol-Ch+Ch-
TV10x150x120x130x100x11
DVD/Blu-ray20x150x120x130x100x11
AV Receiver40x150x120x130x100x11
Projector70x150x120x130x100x11

Philips RC5 Protocol

Developed by Philips in 1986, RC5 is the dominant IR protocol in Europe. It is used by Philips, Marantz, and many European AV manufacturers. RC5 uses Manchester encoding, making it more robust against noise than pulse-distance encoding.

  • Carrier: 36kHz
  • Bits: 14 (1 start + 1 toggle + 5 address + 6 command)
  • Encoding: Manchester — transition in middle of bit period: low-to-high = "1", high-to-low = "0"
  • Bit time: 1.778ms per bit

RC5 Key Codes

DeviceAddressPowerVol+Vol-Ch+Ch-
TV00x0C0x100x110x200x21
DVD10x0C0x100x110x200x21
Satellite40x0C0x100x110x200x21
Amplifier50x0C0x100x110x200x21

RC6 Protocol

RC6 is an extension of RC5 developed by Philips, supporting longer command fields and multi-bit addressing. It is widely used for Microsoft MCE (Media Center) remotes and modern Philips equipment.

  • Carrier: 36kHz
  • Bits: 16-32 (mode field allows variable length)
  • Encoding: Manchester with double-width start bit
  • Notable: Used by Microsoft Windows Media Center remotes

Samsung Protocol

Samsung uses its own variant of the NEC protocol with a 32-bit format. While similar in structure to NEC, Samsung uses different timing parameters and a distinctive leader code.

  • Carrier: 38kHz
  • Bits: 32 (8-bit device + 8-bit sub-device + 8-bit command + 8-bit command inverse)
  • Leader: 4.5ms burst + 4.5ms space (longer than NEC's 9ms)
  • Encoding: Pulse distance — 560μs burst, 560μs space = "0", 560μs burst, 1690μs space = "1"

Samsung Key Codes

DeviceAddressPowerVol+Vol-Ch+Ch-
TV0x070x020x070x0B0x120x10
Soundbar0x0E0x020x070x0B0x120x10
Blu-ray0x080x020x070x0B0x120x10

Other Notable Protocols

  • JVC: Uses a modified NEC protocol with inverted carrier (active low).
  • Denon: Similar to NEC but with 24-bit address extension.
  • Sharp: Uses pulse distance with different timing than NEC (132μs short, 339μs long).
  • Motorola: Similar to RC5 but with different bit timing.
  • Panasonic: Uses NEC-like protocol with 48-bit extended addressing.
  • Yamaha: Uses RC5-compatible protocol with Yamaha-specific addresses.

Finding Your Device's IR Codes

To find the exact IR codes for your specific device, use one of these resources:

  • IRDB (GitHub): The most comprehensive open-source IR code database, organized by manufacturer and device type. Search by model number.
  • LIRC: Linux Infrared Remote Control project maintains a large collection of IR code files.
  • ProntoCoded: Community-maintained database of Pronto-format IR codes.
  • Global Cache: Commercial IR database with codes verified for their hardware.
  • Learning Remote: Use a universal learning remote or IR receiver to capture codes directly from your original remote.

Timeline

1980NEC protocol developed — becomes the most widely used IR standard
1986Philips RC5 protocol adopted across European manufacturers
1987Sony SIRC protocol standardizes Japanese AV remote control
1990RC6 protocol adds multi-bit addressing for expanded device control
1992Samsung protocol diverges from NEC with 32-bit address+command
1995Motorola protocol (similar to RC5) used in Asian markets
2000Device manufacturers adopt protocol-specific codes for unique functions
2010Smartphone IR blasters enable universal remote functionality
2015Global Caches and IR databases consolidate protocol information