CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC18F47J53 big-endian float IEEE754/float conversion

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Marco27293



Joined: 09 May 2020
Posts: 110

View user's profile Send private message

PIC18F47J53 big-endian float IEEE754/float conversion
PostPosted: Thu Apr 27, 2023 6:42 am     Reply with quote

Hi,

I'm using a PIC18F47J53 , CCS C compiler version 5.090.

A sensor provides big-endian float IEEE754 data (1 sample, 4 bytes).

I need to convert them in float type variables.

How can I do this ?

Regards,

Marco
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Apr 27, 2023 7:31 am     Reply with quote

Look in the drivers directory. IEEEfloat.c
Provides code to convert a four byte value stored in an int32 to PIC format
and to IEEE format. Also a union 'joiner' to give the conversion between
a value in int32 and float.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group