[Top][All Lists]

[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: Mon, 26 May 2003 13:26:56 +0530
User-agent: KMail/1.4.1

Hi Friends
I am I am making a sound decibel meter Currently I am using the atmel's 
Now the problem is that how do I store a float value in 8 bit registers . 

 I have the ADC o/p in a 8 bit register
 I wanted to do operations on that, so I stored the value in an unsigned char 
temp1. Then for finding the decibel value I did a 
10 * log10(temp1) The result is now a float

Now if I want to store the float value back to the 8 bit registers how do I do 
that?  Even if I know how many bytes are taken by the float the float value 
will be in 2's complement. Can you tell me what methods are usually used.

Abhijeet D Mhatre
Email: address@hidden

reply via email to

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