I presented a way to do that earlier:
"Your other question: I need to know more what a number like 2,593 is.
Are those 4 hex digits?
There are ways to separate it into digits.
For example, hex data digit = 2593:
digit0 = digit AND 0x000F now digit0 = 0003
digit1 = digit >>4 now digit 1 = 0259 (shifted 4 bits away)
digit1 = digit1 AND 0x000F now digit1 = 0009
digit2 = digit1 >>4 now digit2 = 0025
digit2 = digits AND 0x000F now digit2 = 0005
digit3 = digit2 >>4 now digit3 = 0002"
Try this:
digit = 0x2593;
digit0 = digit && 0x000F; // mask off the upper 12 bits
Serial.print (digito, HEX);
digit1 = digit >>4; // shift off the lower 4 bits
digit1 = digit1 && 0x000F; // mask off the upper 12 bits
Serial.print (digit1, HEX);
digit2 = digit >> 8; // shift off the lower 8 bits
digit2 = digit2 && 0x000F; // mask off the upper 12 bits
Serial.print (digit2, HEX);
digit3 = digit >> 12; // shift off the lower 12 bits
digit3 = digit3 && 0x000F; // mask off the upper 12 bits
Serial.print (digit3, HEX);
I don't know where the decimal point goes, not enough info provided.