Ann_BBO
10-19-2009, 02:01 AM
Hi All,
I have a question about the binary to hex problem in excel sheet. For the file structure, please see the attached excel file.
Column B is the hex value with 2 Bytes format. (e.g. 0xFFFF) regarding to combination of Column G. The setting value in column G base on the Column E (bits offset) and Column F (bit size). This is the default value. All these values take as references.
Example:
Column .......B .............E ................F ..............G
Description Value ......Bit offset...Bit size...Default value
.......................0xC034...0 .................4 ............0x0004
......................................4................. 8 ............0x0003
......................................12.............. .3.............0x0004
......................................15................ 1 ...........0x0001
Explanation of Combination of “0xC034” is
15 11 7 3
1100 0000 0011 0100
Now, Column C is the new changed value and Column H are the “Changed value” (hex format) regarding to combination of G and H. If H column has a new value, ignore the “Default value”. Combination of G and H will create the new value in column C.
Example:
Column .......B........... C......... E............... F........... G..................... H
Description Value.. .New ....Bit offset Bit size Default value Changed
.......................0xC034..0xB031.0.............. 4............ 0x0004............. 0x0001
...................................................4.............. 8............ 0x0003
...................................................12............ 3............. 0x0004 ............0x0003
...................................................15............ 1.............. 0x0001
Explanation of Combination of “0xB031”
15 11 7 3
1011 0000 0011 0001
Another problem is the Bit size checking. Since the Column H value are fixed by Column F (Bit size). If the actual bit size of “Changed value” is bigger than Bit size setting.
Example:
Column ........F............H
Description Bit size Changed
.......................3.............0x0008
Since 0x0008 has more than 3 address bits (i.e. 1000 b) is larger than 3 bit size.
Give the warning and no update on "Changed Value".
Thanks,
Ann
2009-10-19
I have a question about the binary to hex problem in excel sheet. For the file structure, please see the attached excel file.
Column B is the hex value with 2 Bytes format. (e.g. 0xFFFF) regarding to combination of Column G. The setting value in column G base on the Column E (bits offset) and Column F (bit size). This is the default value. All these values take as references.
Example:
Column .......B .............E ................F ..............G
Description Value ......Bit offset...Bit size...Default value
.......................0xC034...0 .................4 ............0x0004
......................................4................. 8 ............0x0003
......................................12.............. .3.............0x0004
......................................15................ 1 ...........0x0001
Explanation of Combination of “0xC034” is
15 11 7 3
1100 0000 0011 0100
Now, Column C is the new changed value and Column H are the “Changed value” (hex format) regarding to combination of G and H. If H column has a new value, ignore the “Default value”. Combination of G and H will create the new value in column C.
Example:
Column .......B........... C......... E............... F........... G..................... H
Description Value.. .New ....Bit offset Bit size Default value Changed
.......................0xC034..0xB031.0.............. 4............ 0x0004............. 0x0001
...................................................4.............. 8............ 0x0003
...................................................12............ 3............. 0x0004 ............0x0003
...................................................15............ 1.............. 0x0001
Explanation of Combination of “0xB031”
15 11 7 3
1011 0000 0011 0001
Another problem is the Bit size checking. Since the Column H value are fixed by Column F (Bit size). If the actual bit size of “Changed value” is bigger than Bit size setting.
Example:
Column ........F............H
Description Bit size Changed
.......................3.............0x0008
Since 0x0008 has more than 3 address bits (i.e. 1000 b) is larger than 3 bit size.
Give the warning and no update on "Changed Value".
Thanks,
Ann
2009-10-19