Page 1 of 1

4DTV formula update

Posted: Tue Jun 12, 2007 4:42 pm
by The Robman
I have just received some 4DTV upgrades from UEI that use non-zero units codes, which we've never seen before, so I was able to use these to verify whether we have the complete formula correct for the 4DTV protocol.

Just as a reminder, the 4DTV signal is 12 bits long where the 1st 8 bits are the command code (in LSB format) and the last 4 bits are a checksum.

If the bits are labeled as: 76543210ABCD

The formula that we are currently using is:
A=0^1^3^4^7
B=0^1^2^4^6^7
C=0^1^3^5^6
D=0^2^4^5

But the correct formula is:
A=1^3^4^7 (ie, don't include bit-0)
B=0^1^2^4^6^7
C=0^1^3^5^6
D=0^2^4^5

Keep in mind that when 2 numbers are XOR'd together, the result is the same regardless of whether the original numbers have been complimented or not (ie, 0^0=0 and 1^1=0). Therefore, as the official 4DTV executor is LSB-COMP, when the number of bits in the formula is an even number, the result will need to be complimented.

So, for the official exec, the formula is:
A=~(1^3^4^7)
B=~(0^1^2^4^6^7)
C=(0^1^3^5^6)
D=~(0^2^4^5)

Posted: Tue Jun 12, 2007 8:03 pm
by The Robman
The fix for KM is to change the formula for GetB2w_4DTV_xSum1

from
=MOD(MID(bin2,1,1)+MID(bin2,4,1)+MID(bin2,5,1)+MID(work!$G$17,1,1)+MID(work!$G$17,2,1),2)

to
=MOD(1+MID(bin2,1,1)+MID(bin2,4,1)+MID(bin2,5,1)+MID(work!$G$17,1,1),2)

And to change the fixed data for the hacked protocol from "C6 3D A5 EF" to "C6 3D A5 E7"

Here's an updated version of KM:
http://www.hifi-remote.com/forums/dload ... le_id=1888

For RM, the fixed data should also be changed for the hacked version, and the GI2 class will need to be edited for the official version.