SparkFun will be closing early at 3:30 Friday 5/27 and remain closed Monday for Memorial Day (5/30). Orders placed after 2pm MT on Friday (5/27) will process and ship out on Tuesday (5/31).

Member #41456

Member Since: June 13, 2008

Country: United States

  • A note about the codes used by the Sparkfun remote control: The control sends 32 bits of information that comprise an address and the bitwise complement of the address, and the command and the bitwise complement of the command. The remote-control documentation notes all “codes” begin with 10EF. Actually, that’s an address of 01 and its complement, EF. The documentation also shows a two-byte code for each button. The code 807F corresponds to the “>” pushbutton, for example. Actually, this represents the command 80, followed by its complement 7F. The NEC format allows for 256 addresses (one byte) and 256 commands (one byte). The complement information can aid in detecting errors, but it adds nothing useful to the actual address or command information. So there’s no need for software to decode the bits in the complemented information.

    Also, the NEC protocol places the least-significant bit (LSB) first in the transmission of each byte, so although the Sparkfun information will work if you assume MSB first, it will not work for remote devices that adhere to the NEC format. In that format, the address becomes 00001000 or 08 hex, and the “>” button sends the command 00000001, or 01 hex.

    For more information on the NEC protocol and timing, see the section, “Pulse Distance Coding…” in the Freescale Semiconductor application note, “Infrared Remote Control Techniques…” AN3053 at: http://www.freescale.com/files/microcontrollers/doc/app_note/AN3053.pdf.

    Cheers, Jon

No public wish lists :(