Hi,
This Perl script decodes commands from PANASONIC EUR648251 (http://http://www.dvdremotecontrols.com/Mfrs/Panasonic/PanasonicAudio/EUR648251.htm) remoce. The protocol is similar to NEC but with different timings and 6 data bytes encoded.
According to this lirc file (http://http://lirc.sourceforge.net/remotes/panasonic/EUR648251) the decoder is working (pre_data is the same and the codes are correct too). The attached bin file contains 'Power','1','2' and '3' button codes.
G:ProjectsEclipse-3.6IRToy>ir_PAN.pl test000.bin
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0xfd(11111101) 0xbb(10111011)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0xfd(11111101) 0xbb(10111011)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x09(00001001) 0x4f(01001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x09(00001001) 0x4f(01001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x49(01001001) 0x0f(00001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x49(01001001) 0x0f(00001111)
Only last 2 bytes are different so maybe the first four are device descriptors and/or addresses?
BR,
Anton
Thanks! Is it ok to keep adding your examples and images to the wiki? (CC-BY-SA license)
[quote author="anton.todorov"]
G:ProjectsEclipse-3.6IRToy>ir_PAN.pl test000.bin
...
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
Only last 2 bytes are different so maybe the first four are device descriptors and/or addresses?
[/quote]
FWIW, This is what your capture looks like in IRscope. See this thread (http://http://dangerousprototypes.com/forum/index.php?topic=1482.0) where I posted a tiny script to convert .bin files into .ict files.
The last four bytes are: Device Code (0x05), Sub-device code (0x43), Function code (0x89), and an 8 bit checksum (0xCF == 0x05 ^ 0x43 ^ 0x89).

IRScope / DecodeIR came up with a summary of the signal using the IRP notation form the JP1 forums of:
{0.0k,430,msb}<1,-1|1,-3>(8,-4,A:48,1,-74.7m)+{A=$4004054389CF}; Alt leadout form: ^135m
DecodeIR.html says Panasonics IRP form is:
{37k,432}<1,-1|1,-3>(8,-4,2:8,32:8,D:8,S:8,F:8,(D^S^F):8,1,-173)+
While there is a bunch I don't understand this means:
* the carrier frequency is 37 Khz,
* The Mark/space (on/off) times are multiples of 432 microseconds.
* A '0' is represented by 432 us on, followed by 432 us off.
* A '1' is 432 us on, 3 x 432 us = 1296 us off.
* The lead in is 8 x 432 == 3456 us on, and 1728 us of off time.
* The first two pieces of data should be 2 and 32 encoded in 8 bits each, which are the oem id.
* The device , sub-device, and function code are 8 bits each.
* The checksum is are those three bytes xor'd together, also encoded in 8 bits.
* The lead out is 432 us on, 74736 us off.
MSB vs. LSB.
* For the Device & Subdevice code, IRScope is showing 160, 194. it's interpreting the data as sent MSB first. 160 = 0b1010000, interpreted LSB first that's 5 (0x101), and 194 = 0b11000010, lsb first is 0x43.
* Your first two bytes 0x40 and 0x04Y that should be the oem interpreted LSB first gives 2, 32.