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

PIC24: ccs picc and printf

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







PIC24: ccs picc and printf
PostPosted: Mon Jan 25, 2010 2:23 pm     Reply with quote

Hello. I have problem. I'm using v4.103 for PIC24fj64ga002. And my problem:
Code:

float result;

printf(lcd_putc, "%f",result);

It's some part of my code. When my program come to line
Code:

printf(lcd_putc, "%f",result);

and try do it then PIC is RESET. What I don't do right ? I use this function for PIC16f877A and don't have any problem. Please help me.
You will excuse me for the rough language. I am from the Ukraine.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Jan 25, 2010 3:34 pm     Reply with quote

I can imagine at least two possible problems:

- any issues with your implemenation of lcd_putc(), e.g. involving access to non-existent memory. Does lcd_putc() work with other data types?

-a stack overflow, as dicussed in the forum before. Try to increase the stack by
Code:
#build(stack = 256)
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Tue Jan 26, 2010 2:50 am     Reply with quote

Could also be WDT. Show your fuses and init code.
GLADKIH_UA
Guest







PostPosted: Tue Jan 26, 2010 10:57 am     Reply with quote

FvM wrote:
I can imagine at least two possible problems:

- any issues with your implemenation of lcd_putc(), e.g. involving access to non-existent memory. Does lcd_putc() work with other data types?

-a stack overflow, as dicussed in the forum before. Try to increase the stack by
Code:
#build(stack = 256)

Thank you. all work oke'y when i try use #build(stack = 256)
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Jan 26, 2010 3:03 pm     Reply with quote

Seems like CCS developers will be the last to realize, that PCD default stack allocation is insufficient.
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