On 02/15/04 12:40, mikage said...
900A 006D 0000 0001 18E6 00FF
The is NEC1 protocol. It is device 24 (18 hex) subdevice 230 (E6 hex) and command 0.
58 0 f 6c 5 60 ab 16 15 40 ab 55
3f 7f f0 b 31 10 10 10 20 20 10 10 10 10 20 20
10 10 20 20 20 10 10 10 10 10 10 10 10 20 20 20
20 20 20 20 20 0 bf 49 f0 a bf 10 4 f0 d
The header part of that is complicated to decode and more complicated to encode. But since you have learned samples already, you can keep the header and tail parts of the signal and just tweak the data part.
58 0 f 6c 5 60 ab 16 15 40 ab 55 3f 7f f0 b 31
Thats the header
10 10 10 20 20 10 10 10
That's the device number (18 hex) in reversed binary
10 20 20 10 10 20 20 20
Thats the subdevice (E6 hex) in reversed binary
10 10 10 10 10 10 10 10
That's the command number 0 in reverse binary
20 20 20 20 20 20 20 20
That's the command number complement (FF) in reverse binary.
0 bf 49 f0 a bf 10 4 f0 d
That is lead-out and repeat data.
To convert another one from 900A format to that XML format, get the command (left two hex digits of the last 4-digit hex number). Convert from hex to binary and reverse the sequence and use "10" for each 0 bit and "20" for each 1 bit. Put that in place of the command part of the XML. Make the command complement by using a 20 everwhere the command is 10 and a 10 everywhere the command is 20.
Leave everthing other than command and command complement unchanged.