This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hex to Float conversion Problems



Hello,

I am reading read 4 Hex values 0xA0 0xEC 0xA4 0x40 that i need to convert to a floar

I've saved this values on 2 arrays

char Voltage[4] = {0xA0 0xEC 0xA43 0x40};

to convert i'm doing

Volt = *(float*)Voltage; // result 2.16734...e-38

but the value doenst match. i've also tryed to reverse the order os the values but it is not working.

I'm using a TMS320F28377S.

Any idea about what could be the problem ?

Thank you

  • Hi Bruno,

    For F28377 core, if you declare character array of 4 elements, then the actual memory allocation will be 8Bytes. Because, Core is 16-bit and each memory address is of 2Bytes Length

    Regards
    Aditya.