-
Notifications
You must be signed in to change notification settings - Fork 0
IR Protocols
NEC (now Renesas) IR code format:
- bit 1: 0.5625 ms pulse, 1.6875 ms space (total duration 2.250 ms)
- bit 0: 0.5625 ms pulse, 0.5625 ms space (total duration 1.125 ms)
The NEC code operates with a carrier frequency of 38 kHz and uses pulse position modulation (PPM).
Header:
Transmission begins with a 9 ms long start bit, followed by a 4.5 ms space.
The message has 32 bits:
- 16 bit manufacturer (adress) field (8 + 8)
- 16 bit command field (8 + 8)
Address and Command are transmitted twice.
The second time all bits are inverted and can be used for verification of the received message.
The total transmission time is constant because every bit is repeated with its inverted length.
The 8 bit wide data is sent twice, the second time inverted.
A complete message is 67.5 ms long.
A new message can be sent every ~108 ms. There is a 40ms gap between a message code and repeat code.
Repeat code:
A special current saving feature is implemented if a key is held down on the controller.
In this case the message consists of a 9 ms start bit followed by a 2.25 ms space and a 0.56 ms pulse.
Sanyo supply ICs that generate codes using this format but have a 13 bit manufacturers code.
Taken from winlirc (duration in microseconds, us):
Yamaha
Typical Header:
bits 16
flags SPACE_ENC|REVERSE
header 9067 4393
one 642 470
zero 642 1600
ptrail 642
repeat 9065 2139
pre_data_bits 16
gap 39597
IR format properties are conveniently packed in ir_format.py
which can be updated with more vendor specific details.