Introduction
15
SLES115 — August 2004
TAS5518
1.5.2.1
28-Bit 5.23 Number Format
All mixer gain coefficients are 28-bit coefficients using a 5.23 number format. Numbers formatted as 5.23
numbers means that there are 5 bits to the left of the decimal point and 23 bits to the right of the decimal point.
223 Bit
S_xxxx.xxxx_xxxx_xxxx_xxxx_xxx
24 Bit
21 Bit
20 Bit
Sign Bit
23 Bit
Figure 17. 5.23 Format
The decimal value of a 5.23 format number can be found by following the weighting shown in
Figure 18. If
the most significant bit is logic 0, the number is a positive number, and the weighting shown yields the correct
number. If the most significant bit is a logic 1, then the number is a negative number. In this case every bit must
be inverted, a 1 added to the result, and then the weighting shown in
Figure 18 applied to obtain the
magnitude of the negative number.
(1 or 0) x 23 + (1 or 0) x 22 + … + (1 or 0) x 20 + (1 or 0) x 21 + … + (1 or 0) x 24 + … + (1 or 0) x 223
23 Bit
22 Bit
20 Bit
21 Bit
24 Bit
223 Bit
Figure 18. Conversion Weighting Factors—5.23 Format to Floating Point
Gain coefficients, entered via the I2C bus, must be entered as 32-bit binary numbers. The format of the 32-bit
number (4-byte or 8-digit hexadecimal number) is shown in
Figure 19.u
Coefficient
Digit 8
u u u
S x x x
Coefficient
Digit 7
x. x x x
Coefficient
Digit 6
x x x x
Coefficient
Digit 5
x x x x
Coefficient
Digit 4
x x x x
Coefficient
Digit 3
x x x x
Coefficient
Digit 2
x x x x
Coefficient
Digit 1
Fraction
Digit 5
Sign
Bit
0
Fraction
Digit 6
Fraction
Digit 4
Fraction
Digit 3
Fraction
Digit 2
Fraction
Digit 1
Integer
Digit 1
u = unused or don’t care bits
Digit = hexadecimal digit
Figure 19. Alignment of 5.23 Coefficient in 32-Bit I2C Word
As
Figure 19 shows, the hex value of the integer part of the gain coefficient cannot be concatenated with the
hex value of the fractional part of the gain coefficient to form the 32-bit I2C coefficient. The reason is that the
28-bit coefficient contains 5 bits of integer, and thus the integer part of the coefficient occupies all of one hex
digit and the most significant bit of the second hex digit. In the same way, the fractional part occupies the lower
3 bits of the second hex digit, and then occupies the other five hex digits (with the eighth digit being the
zero-valued most significant hex digit).