Decimal to Register conversion
Posted: Fri Mar 09, 2018 7:09 pm
I am working on a customer application that retrieves data from a PC board via IP.
The board scans a card that has an embedded number.
The data is returned as 5 decimal values from 5 registers.
The number printed on the card is 31152.
The data is returned in 5 registers:
RegE: 0
RegD: 2
RegC: 202
RegB: 243
RegA: 96
I cannot figure out how the values in these registers equals 31152.
I try to assign different binary weights to each register but it never adds up to 31152.
Any ideas?
Here is another one:
Number of card is 62081
RegE: 0
RegD: 3
RegC: 115
RegB: 229
RegA: 2
One more:
Number of card is 38463
RegE: 0
RegD: 0
RegC: 19
RegB: 44
RegA: 127
The board scans a card that has an embedded number.
The data is returned as 5 decimal values from 5 registers.
The number printed on the card is 31152.
The data is returned in 5 registers:
RegE: 0
RegD: 2
RegC: 202
RegB: 243
RegA: 96
I cannot figure out how the values in these registers equals 31152.
I try to assign different binary weights to each register but it never adds up to 31152.
Any ideas?
Here is another one:
Number of card is 62081
RegE: 0
RegD: 3
RegC: 115
RegB: 229
RegA: 2
One more:
Number of card is 38463
RegE: 0
RegD: 0
RegC: 19
RegB: 44
RegA: 127