Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHello,
You can use a function to copy hexadecimal values using the address like that :
unsigned long F32ToHex (float valueF)
{
unsigned long* valueL = (unsigned long*) &valueF;
return *valueL;
}And you call it as following :
float value = 678.482;
unsigned long hexValue;
hexValue = F32ToHex(value);
IOWR(SQRT_BASE, 0, hexValue);
Jérôme