From: "Saved by Internet Explorer 11" Subject: SB-Projects: IR Remote Control, NEC Protocol Date: Thu, 26 Jun 2014 11:35:56 -0700 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_0043_01CF9132.CB691E90" X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609 This is a multi-part message in MIME format. ------=_NextPart_000_0043_01CF9132.CB691E90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.sbprojects.com/knowledge/ir/nec.php
=20 =20 =20 =20 =20 =20
NavigationHome =20 =20 |
NEC ProtocolTo my knowledge the protocol I describe here was developed by =
NEC. I've=20
seen very similar protocol descriptions on the internet, and there =
the=20
protocol is called Japanese Format. Features
ModulationThe NEC protocol uses pulse distance encoding of the =
bits. Each=20
pulse is a 560=B5s long 38kHz carrier burst (about 21 cycles). A =
logical "1"=20
takes 2.25ms to transmit, while a logical "0" is only half of =
that, being=20
1.125ms. The recommended carrier duty-cycle is 1/4 or 1/3. Protocol
The picture above shows a typical pulse train of the NEC = protocol. With=20 this protocol the LSB is transmitted first. In this case Address = $59 and=20 Command $16 is transmitted. A message is started by a 9ms AGC = burst, which=20 was used to set the gain of the earlier IR receivers. This AGC = burst is=20 then followed by a 4.5ms space, which is then followed by the = Address and=20 Command. Address and Command are transmitted twice. The second = time all=20 bits are inverted and can be used for verification of the received = message. The total transmission time is constant because every bit = is=20 repeated with its inverted length. If you're not interested in = this=20 reliability you can ignore the inverted values, or you can expand = the=20 Address and Command to 16 bits each!
A command is transmitted only once, even when the key on the = remote=20 control remains pressed. Every 110ms a repeat code is transmitted = for as=20 long as the key remains down. This repeat code is simply a 9ms AGC = pulse=20 followed by a 2.25ms space and a 560=B5s burst.
Extended NEC protocolThe NEC protocol is so widely used that soon all possible =
addresses=20
were used up. By sacrificing the address redundancy the address =
range was=20
extended from 256 possible values to approximately 65000 different =
values.
This way the address range was extended from 8 bits to 16 bits =
without=20
changing any other property of the protocol. The command redundancy is still preserved. Therefore each = address can=20 still handle 256 different commands.
Keep in mind that 256 address values of the extended protocol = are=20 invalid because they are in fact normal NEC protocol addresses. = Whenever=20 the low byte is the exact inverse of the high byte it is not a = valid=20 extended address. External LinksExample CommandsThe table below lists the messages sent by the remote control = of my=20 late Fisher 530 VCR (it served us well during its 20 years long = life).=20
|