How do i send a double value in bcd format (byte[3]) data to serial port device?

hi guys...im new to this forum...can anyone help me plz...

C++, Serial, Communication

I need to send the amount to the serial device in bcd format. I know how to convert int to bcd, but i am not clear how to convert double value to bcd. for e.g.
If I have (amount = 11.02) , the bcd equivalent must be 00010001.00000010, In this do i need to convert the decimal point "." also to bcd. I want to convert it to byte array byte[3].
Topic archived. No new replies allowed.