avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] storing a float value to a 8-bit registers


From: Abhijeet D Mhatre
Subject: [avr-gcc-list] storing a float value to a 8-bit registers
Date: Tue, 27 May 2003 13:17:23 +0530
User-agent: KMail/1.4.1

>The avr-libc library stores floats and doubles in four bytes in "special"
>format which consists of four parts: sign, exponent, fraction and fraction
>extention. For details look into avr-libc sources (eg. fp_split.S file).
>You can implement what you want using a standard C union + structure with
>bitfields.

Thanks Mr. Artur Lipowski  for your response.
Is the fact that avr-library stores floats and doubles in 4-bytes, documented 
in any of its manuals or guides. I mean how are we programmers to know that 
without digging into its code.


>Why you nedd to "manually" load float into registers?
I want to display the decibel value ( in double )
for that I will have to take it our through the 8 bit ports. 
Thats why I wanted to load the float/ double in the registers.
If there is a more elegant solution please let me know.

-- 
Regards
Abhijeet D Mhatre







reply via email to

[Prev in Thread] Current Thread [Next in Thread]