EmbeddedRelated.com
Forums

int8 and int16 to float. CCS

Started by sirtiffguy October 22, 2004

I'm wondering on the conversion between the int (8 bit) and int16
to Float in the CCS (PCW).
Is there a function I have to run to convert between the forms? or
can i go...

int8 my_int = 0x05;
float my_float = 12.5E-2;

my_float = my_int * my_float;




----- Original Message -----
From: "sirtiffguy" <>
To: <>
Sent: Friday, October 22, 2004 5:16 AM
Subject: [piclist] int8 and int16 to float. CCS >
>
> I'm wondering on the conversion between the int (8 bit) and int16
> to Float in the CCS (PCW).
> Is there a function I have to run to convert between the forms? or
> can i go...
>
> int8 my_int = 0x05;
> float my_float = 12.5E-2;
>
> my_float = my_int * my_float;

Why not use casts?

Leon