Posted: Tue Jun 22, 2004 11:18 am
If you liked that, go unhide all the sheets in KM Master and look around 
Forum for JP1 remotes
https://www.hifi-remote.com/forums/
If you do start unhiding stuff, start with the EFCw sheet!Ironbreeze wrote:KM flat out impressed me the minute I opened it up, and I haven't even un-hid anything.
We'll keep that in mind!Ironbreeze wrote:...if you ever come across a need for a spreadsheet to add two cells together and display the results in a third cell, I'm your man.
Code: Select all
0000 0000 0000
0001 0001 0001 *
0101 0110 0001
0010 0010 0010 *
0110 0100 0010
0000 1001 0011
0111 0101 0011
0011 0011 0011 *
0000 0010 0100
0110 1111 0100
0100 0100 0100 *
0010 0000 0100
0100 1100 0101
0101 0101 0101 *
0011 0001 0101
0101 0101 0101 *
0100 0000 1000
0000 0100 1000
0001 0101 1001
0100 1000 1001
0101 0001 1001
0011 0110 1001
0110 0010 1010
0000 1101 1011
0111 0011 1011
0110 0000 1100
0010 0100 1100
0111 1010 1100
0000 1111 1111
Code: Select all
A B C A XOR B
0000 1001 0011 1001
0000 0010 0100 0010
0010 0000 0100 0010
0100 0000 1000 0100
0000 0100 1000 0100
0100 1000 1001 1100
0000 1101 1011 1101
0110 0000 1100 0110
0010 0100 1100 0110
0000 1111 1111 1111
Code: Select all
start: LD RC0,R04 ; save command in RC0
LD RC1,RC0 ; save command in RC1
LD RC6,RC0 ; save command in RC6 (just need LSB)
SWAP RC1 ; swap nibbles in RC1
Code: Select all
start: LD RC0,R04 ; save command in RC0
LD RC6,RC0 ; save command in RC6 (just need LSB)
RCF ;set carry to 0
RRC RC0 ;shift the make bit off
LD RC1,RC0 ; save command in RC1
SWAP RC1 ; swap nibbles in RC1
Code: Select all
XOR RC0,RC1 ; XOR RC1 into RC0
RR RC0 ; rotate result right 1 bit
AND RC2,RC3 ; AND RC2 and 3 together
Code: Select all
XOR RC0,RC1 ; XOR RC1 into RC0
RL RC0 ; rotate result left 1 bit
AND RC2,RC3 ; AND RC2 and 3 together
Actually, here's how I was trying to do it. Rather than define the signal as using a 5-bit device, 8-bit command and 4-bit checksum, I set it up as 5-bit device, 7-bit function and 5-bit checksum. So once control is passed to the engine, it will only take the 7 leftmost bits from the command (R04) and ignore the right bit. It will get the rightmost command bit from the first bit of the checksum, which I do make sure is the right value.Ironbreeze wrote:I haven't had time to look at it much (been very busy here today). But I gather that you're using the right bit of the command to represent the make/break bit, and dropping the left bit to make room for it. Might as well, it appears to always be 0 anyway. But the code doesn't seem to right shift the command back into it's correct place and appending the 0 to the left before doing the calculations on it.
Why, thank you sir!Ironbreeze wrote:ps. That reverse sub is a work of a pure genius. I would never have believed that bits could be reversed with so few opcode bytes.