Member #41456

Member Since: June 13, 2008

Country: United States

  • So much processing power, so few I/Os, so many shared pins. Sad.

  • 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:

    Cheers, Jon

No public wish lists :(