View previous topic :: View next topic |
Author |
Message |
GLADKIH_UA Guest
|
PIC24: ccs picc and printf |
Posted: Mon Jan 25, 2010 2:23 pm |
|
|
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
|
|
Posted: Mon Jan 25, 2010 3:34 pm |
|
|
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
|
|
Posted: Tue Jan 26, 2010 2:50 am |
|
|
Could also be WDT. Show your fuses and init code. |
|
|
GLADKIH_UA Guest
|
|
Posted: Tue Jan 26, 2010 10:57 am |
|
|
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
|
|
Posted: Tue Jan 26, 2010 3:03 pm |
|
|
Seems like CCS developers will be the last to realize, that PCD default stack allocation is insufficient. |
|
|
|