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

Float Format

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



Joined: 02 Jul 2008
Posts: 27

View user's profile Send private message

Float Format
PostPosted: Wed Sep 10, 2008 5:16 am     Reply with quote

I've some problems with the float-format.

The standard IEEE float-format looks like this:


But the CCS Compiler changes sign and exponent. (The sign is on position 23 and the exponent goes from bit 24 to 31).
Why is that so or I am wrong?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Sep 10, 2008 6:27 am     Reply with quote

I believe CCS still uses a format Microchip came up with before the IEEE came up with theirs. It is a choice between industry compatibility and backward compatibility.
_________________
The search for better is endless. Instead simply find very good and get the job done.
wewa



Joined: 02 Jul 2008
Posts: 27

View user's profile Send private message

PostPosted: Wed Sep 10, 2008 7:47 am     Reply with quote

Oh ok.

I had only some problems on communication with VB.
Ttelmah
Guest







PostPosted: Wed Sep 10, 2008 10:02 am     Reply with quote

It is also fractionally easier to write using the PIC instructions. You get about 5% faster performance using this layout, and a PIC, than with the IEEE layout and the PIC. This changes with the latest DSPICs, and CCS switches to using IEEE format on these. I wrote my own assembler PIC libraries for the earliest 16 chips, and it saved a noticeable amount of time to go with this layout.
Sending to VB shouldn't be a problem. There are PIC libraries for doing the conversion included with the compiler now, and in the past several people have also posted versions (I have posted VB versions several years ago).

Best Wishes
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