Display 24 Bit Number with BS2
Archiver
Posts: 46,084
I have a 24 bit number that is stored as three bytes in an array.
The three bytes represent one 24 bit number that I would like to
display in the debug window or send out the COM port for display on a
PC. For example:
count(0)=0001 0011 (LSB)
count(1)=0100 0001
count(2)=0001 0001 (MSB)
This is how the 24 bit decimal number 1,130,771 is stored and I would
like to display it as a decimal number. Problem is I don't know how
to go about showing it.
Any pointers on how to display numbers stored as bytes as the
combined number they represent ?
Thank You
The three bytes represent one 24 bit number that I would like to
display in the debug window or send out the COM port for display on a
PC. For example:
count(0)=0001 0011 (LSB)
count(1)=0100 0001
count(2)=0001 0001 (MSB)
This is how the 24 bit decimal number 1,130,771 is stored and I would
like to display it as a decimal number. Problem is I don't know how
to go about showing it.
Any pointers on how to display numbers stored as bytes as the
combined number they represent ?
Thank You
Comments
http://www.emesystems.com/BS2math6.htm#showdubdec
-- Tracy
>I have a 24 bit number that is stored as three bytes in an array.
>The three bytes represent one 24 bit number that I would like to
>display in the debug window or send out the COM port for display on a
>PC. For example:
>count(0)=0001 0011 (LSB)
>count(1)=0100 0001
>count(2)=0001 0001 (MSB)
>
>This is how the 24 bit decimal number 1,130,771 is stored and I would
>like to display it as a decimal number. Problem is I don't know how
>to go about showing it.
>
>Any pointers on how to display numbers stored as bytes as the
>combined number they represent ?
>
>Thank You