Thread: printf problem
View Single Post
  #5   Spotlight this post!  
Unread 29-01-2005, 19:58
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: printf problem

Quote:
Originally Posted by chakorules
Is float supported in this PIC?
No.
Quote:
Originally Posted by chakorules
Can I even do a calculation like this?
Yes.

The PIC18 does not contain a floating point unit or floating point instructions. All floating point math is handled in software and handled inline by the compiler. This is why all floating point math takes a long time, and is highly discouraged.

However, from looking at the documentation, it appears that floats are not supported by printf() and related functions. See section 4.7 in .\mcc18\doc\MPLAB-C18-Libraries.pdf for the formats supported.