I am getting Data from Pic Micro controller to Android App via Blue tooth Module, The Data is having 30 Bytes, in that 24 bytes makes 12 ID's each with 16 bits integer(in PIC XC8 C Compiler), representing 1000 to 9999 in Decimal. This binary/Hex value of 14 bits length, should be converted to Human readable form as string to be displayed in Label and also in button texts( 12 buttons are there for displaying, why button - there I use button press to copy this string to dial screen from there I can dial out to do other function to Pic Micro itself.
I need normal string only not 7 segment code, as it is only use full and needed normally in Micro controller coding. That's only a code to drive the segment LED Hardware. Here i don't want to use it.
BCD is 0 to 9 digit only having 4 bits.Hex value 0x3E8 = dec1000, in BCd, it need to have 4 nibbles to hold the value, ie 0x01, 0x0, 0x0, 0x0, or 4 bytes it self. As hex it needed only 14 bits to hold value.
I searched for any library if available, but now I found the way to do this, as
if, short int is 0x03E8,
first divide by dec10, put modulus in the least BCD byte, then
divide the result by dec10, put the modulus in byte 1 of BCD, then
again divide the result by dec10, put the modulus in byte 2 of BCD, then
again divide the result by dec10, put the modulus in byte 3 of BCD that's all the logic.
Now I have to implement code for it.
Thank you All for the response.