Here's how you do it. Vicky got most of this, I'm just giving the full info for anyone else that's interested.
First, identify a good time to round everything to. In this case, I determined that 550 is a good value so I entered that. Then click on the new Times Summary button and copy/paste the times over to notepad.
Then you have to identify the pairs, which in this case are "+550 -550" and "+550 -1650". Deciding which is ONE and which is ZERO is subjective, but typically the pair with the longer OFF time is ONE. So, the next step is to convert the times into binary by editing the pairs to be 1 or 0.
So, so far you should have:
+9100 -4500 0000000100010111010010000000000001001100 +550 -40700 = Power
+9100 -4500 0000000100010111010010000000001011000110 +550 -35750 = CH+
+9100 -4500 0000000100010111010010000000101011001110 +550 -33550 = CH-
+9100 -4500 0000000100010111010010000000010101001001 +550 -35750 = Up
+9100 -4500 0000000100010111010010000000001101001111 +550 -33550 = Right
+9100 -4500 0000000100010111010010000000101101000111 +550 -33550 = Left
+9100 -4500 0000000100010111010010000000011001001010 +550 -35750 = Select
+9100 -4500 0000000100010111010010000000101001000110 +550 -35750 = Menu
+8800 -4500 0000000100010111010010000000100000000000 +550 -40700 = 1
+9100 -4500 0000000100010111010010000000010000001100 +550 -37950 = 2
+9100 -4500 0000000100010111010010000000110000000100 +550 -37950 = 3
+9100 -4500 0000000100010111010010000000001000001010 +550 -37950 = 4
+9100 -4500 0000000100010111010010000000101000000010 +550 -37950 = 5
+9100 -4500 0000000100010111010010000000011000001110 +550 -35750 = 6
+9100 -4500 0000000100010111010010000000111000000110 +550 -35750 = 7
+9100 -4500 0000000100010111010010000000000100001001 +550 -37950 = 8
+9100 -4500 0000000100010111010010000000100100000001 +550 -37950 = 9
+8800 -4500 0000000100010111010010000000010011000000 +550 -40700 = Enter
+9100 -4500 0000000100010111010010000000000000101010 +550 -37950 = Info
+9100 -4500 0000000100010111010010000000010100001101 +550 -35750 = 0
+9100 -4500 0000000100010111010010000000000100101011 +550 -35750 = Guide
+9100 -4500 0000000100010111010010000000110111001001 +550 -33550 = VOL+
+9100 -4500 0000000100010111010010000000110101000001 +550 -35750 = Down
+9100 -4500 0000000100010111010010000000001111000111 +550 -33550 = VOL-
Next step is to figure out the fixed data vs. variable data and to determine if the data is LSB or MSB. For the latter, it's usually a good idea to look at the binary data for the numeric buttons and that holds true in this case too. Looking at the numeric buttons you should be able to tell that the data is LSB because the data increments from the left and the OBCs for buttons 1 thru 9 and zero are 1 thru 10.
So where are we at so far? Based on what I've seen so far, I conclude that we have 28 bits of fixed data, followed by an 8 bit OBC and most likely a 4 bit checksum. The easiest way to format 28 bits is to treat it as 4 bytes of fixed data, with 7 bits per byte. At this point I should point out that Excel is a very useful tool for manipulating the data. When you copy the data from Notepad over to Excel, Excel should automatically format it into columns. Then you can use Data > "Text To Columns" to break the binary data out into 4 7-bit columns, an 8-bit column and a 4-bit column. So, now we have...
0000000 1000101 1101001 0000000 10000000 0000 = 1
0000000 1000101 1101001 0000000 01000000 1100 = 2
0000000 1000101 1101001 0000000 11000000 0100 = 3
0000000 1000101 1101001 0000000 00100000 1010 = 4
0000000 1000101 1101001 0000000 10100000 0010 = 5
0000000 1000101 1101001 0000000 01100000 1110 = 6
0000000 1000101 1101001 0000000 11100000 0110 = 7
0000000 1000101 1101001 0000000 00010000 1001 = 8
0000000 1000101 1101001 0000000 10010000 0001 = 9
0000000 1000101 1101001 0000000 01010000 1101 = 0
0000000 1000101 1101001 0000000 00000100 1100 = Power
0000000 1000101 1101001 0000000 10100100 0110 = Menu
0000000 1000101 1101001 0000000 01100100 1010 = Select
0000000 1000101 1101001 0000000 01010100 1001 = Up
0000000 1000101 1101001 0000000 11010100 0001 = Down
0000000 1000101 1101001 0000000 00110100 1111 = Right
0000000 1000101 1101001 0000000 10110100 0111 = Left
0000000 1000101 1101001 0000000 01001100 0000 = Enter
0000000 1000101 1101001 0000000 00101100 0110 = CH+
0000000 1000101 1101001 0000000 10101100 1110 = CH-
0000000 1000101 1101001 0000000 11011100 1001 = VOL+
0000000 1000101 1101001 0000000 00111100 0111 = VOL-
0000000 1000101 1101001 0000000 00000010 1010 = Info
0000000 1000101 1101001 0000000 00010010 1011 = Guide
The next step is to crack the formula for the checksum to see if it's worth building it into the executor. If you're unable to crack the code, you can skip adding logic to the executor and just use 2 bytes of variable data, where you have 1 byte of 8 bits and another of 4. In KM, you would use the byte2 column to enter the hex for the checksum byte.
However, in this case the assembler code needed to format the checksum will be quite small, so I think it's worth it to go that route.
To format the checksum, you need to XOR the left and right nibbles of the OBC byte together and then complement the leftmost bit. For example, let's look at the VOL+ binary (11011100):
1101 = vol+ (left nibble)
1100 = vol+ (right nibble)
------
0001 = XOR
0001 = result from above
1000 = flip the first bit
------
1001 = XOR
So, if we have 4 fixed bytes, those will be R03 thru R06 (in S3C8 assembler) and the variable byte will be R07. When you format the signal in PB, you'll want to say that you have 2 variable bytes where one is 8 bit and the other is 4 bit, then once you've generated the code, you'll want to edit the "4 dev, 2 cmd" data byte to be "4 dev, 1 cmd" instead.
Then, in the code you'll need:
Code: Select all
LD W1,R07 ; copy the variable byte to a scratch byte
SWAP W1 ; swap the nibbles in the scratch byte
XOR W1,R07 ; XOR the swapped byte with the original
XOR W1,#80h ; flip the left bit
LD R08,W1 ; load the calculated checksum to the 2nd variable byte
INC R11 ; increase the number of variable bytes *
(* in this case, it's not strictly necessary to increase R11 but in almost all other cases you would need to, so that's why I included it here).
Here's an upgrade, formatted for the URC-8910, that you can try...
Upgrade Code 0 = 6F D0 (Cable/2000) IODATA HVT-BT200 (KM v9.17)
FF 0A 76 FC 00 21 00 8A D2 00 DC 3C 3C 2C AC 04
02 54 D4 B4 34 64 A4 12 4C
End
Upgrade protocol 0 = 01 FF (S3C8+) IODATA HVT-BT200 (PB v4.01)
43 8C 41 8B 15 8B 45 07 08 01 13 03 25 01 13 00
FF 4E 20 11 C6 08 B6 FF FF 04 E4 07 08 F0 08 B4
07 08 B6 08 80 8D 01 46
End
Here's a KM file for it:
https://www.hifi-remote.com/forums/dload ... le_id=6955
And here's a zip file containing the KM file, the PB file and the spreadsheet that I used to decode the signal:
https://www.hifi-remote.com/forums/dload ... le_id=6954