On Wed, 04 Mar 2009 18:18:22 -0800
"Rodney McCray" <res1z...@verizon.net> wrote:

> Does anyone have any working sample code that shows how to convert 10
> bit ADC outputs into floating points using GCC.
> I need to work with floating points on an ATtiny25.
> 
> Best Regards,
> Rodney
> 
> 
> 
> 
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-list@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Maybe:

int main(void)
{
        int iadc;
        float fadc;

        fadc = (float) iadc;
}

The big question is, why would you like to do something like that in a
processor like ATtiny25? Why not 32 bit fixed point?

/Janne

-- 
You deserve a better life, dump Windows!


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to