NEC decodes (Normal/Inverse device numbers)

General JP1 chit-chat. Developing special protocols, decoding IR signals, etc. Also a place to discuss Tips, Tricks, and How-To's.

Moderator: Moderators

Post Reply
NEC1
Posts: 56
Joined: Sat Jul 03, 2010 1:36 am

NEC decodes (Normal/Inverse device numbers)

Post by NEC1 »

With an Arduino infrared remote decoder (sketch used is "IRrecvDump.ino"), I got an NEC result of FD02807F (Device Number, Inverse of Device Number (can be Subdevice), Inverse of Function code, Function Code - each having two digits) for a Changhong TV remote control for the "1" key.
What confused me is that the decode was telling me it was Device 64, Subdevice 191 - the inverse of FD (Device 64) in hex is 02 (Subdevice 191).
I then later found a match to the protocol parameters and function codes in TV setup code 0765.

This turns out that if the Device Number and Inverse of Device Number complement each other e.g. FD (Device 64) and 02 (Subdevice 191), then there is no Subdevice; however, if the Device Number and Inverse of Device Number do not complement each other e.g. BF (Device 2) and 42 (Subdevice 189), then this remote has a Subdevice number.
"The best thing possible to do with knowledge is to share it".
Barf
Expert
Posts: 1538
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

That is the Shirriff library. Turns out that Shirriff interprets the parametrization differently from the rest of us; the NEX1 code is really parametrized LSB-first, which Shirriff does observe. Taking this into account, it adds up; FD in the complemented-LSB-first order is 64. (Noted the HexCalculator in IrScrutinizer and IrMaster?. It is nice for interactively doing these computations.)

The Shirriff library is good for capturing and sending, but not really for decoding. In IrScrutinizer I therefore used it only for capturing (and sending), and let DecodeIR do the decoding. It is much better!
Post Reply