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 CCS Technical Support

large code. Strange behavior

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







large code. Strange behavior
PostPosted: Mon Jun 29, 2009 8:38 pm     Reply with quote

Hi

Since a few months I´ve been developed a big program in C, it includes i2c, 5 usart lcd, a/d, I use all the timer interruption. The microcontroller I use is 18f4620. The issue is that I get to a point where I add some extra code and the microcontroller seems not to behave in a right way, for example it is supposed to print a string stored in an array and it don't print the entire string, just a part of the string.

I have about 4000 lines of C code, but the compiler show less than 60% of ram and rom.

Can you give me an advice, maybe I´m not considering jumps of stack pointer. Is there any tool I can use to see if there is a jump of this type?
What do you recommend me to do?

Or some bug in compiler 4.057

Thanks in advance
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 29, 2009 9:27 pm     Reply with quote

Read this thread (2 pages). Someone else had a similar problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=23991

If that doesn't help, post if you're doing anything unusual, such as:
1. Using the XINST fuse.
2. Using an #INT_GLOBAL routine.
3. Enabling Global interrupts inside an interrupt service routine.
4. Enabling interrupts for which you don't have an interrupt service
routine.
5. Running a non-LF PIC at 3.3v, when the data sheet says to use
the "LF" version.
6. Using the #separate directive.
7. Using Goto statements.
8. Using the incorrect oscillator fuse for the crystal frequency.
9. Letting the program run off the closing brace in main(), where it
will hit a hidden SLEEP instruction (placed there by the compiler)
and go to sleep, thus appearing to lock-up (or failing to print an
entire string).
10. Failing to place 100 nF ceramic capacitors between all Vdd pins and
ground, close to the chip.
11. Using a PIC which has errata that may cause your problem.
12. Enabling the Watchdog Timer, but not clearing it often enough, or
in the correct place(s) in the program.
13. Having a poorly regulated Vdd voltage, allowing it to droop down
to a low voltage level during the execution of the program, or it
has excessive noise on it.
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