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

MPLAB: over 150 lines, it crashed

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



Joined: 19 Jun 2007
Posts: 4

View user's profile Send private message

MPLAB: over 150 lines, it crashed
PostPosted: Mon Jun 25, 2007 10:10 am     Reply with quote

I use MPLAB IDE 7.52 with PCWH 4.042. The device is PIC16F877.
My program restart itself when I add new lines of code (apparently) without a logic reason. In fact, I comment some istruction and the program work normally but if I not comment these istruction but other the program continue to work. Then, when I write 150 lines of the code the program crashed.
I would know why happened this problem.
I use for the programmer and debugger ICD2 but this is setting automatically and when I have set manually it not change.

My configuration bits and library are:
#include <16F877.h> //RAM = 368 byte
#device adc=8
#device ICD=TRUE
#FUSES WDT //Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz)
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#use delay(clock=20000000)
#use rs232(baud=9600, parity=N, xmit=PIN_C6, rcv=PIN_C7, stream=, bits=8)
#include <stdio.h>

When I compile its: MPLAB Output -->
Memory usage: ROM=25% RAM=36% - 44%

Perhaps, I must set some options into MPLAB?

Please, help me
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Jun 25, 2007 10:22 am     Reply with quote

1) What do you suppose we can do with the info you give us ?
2) If you believe that it is an MPLAB related problem, did you ask this in the MPLAB forum ?

Humberto
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 25, 2007 11:20 am     Reply with quote

Which program crashes ?

Is it:

1. MPLAB crashes, during compilation with CCS.

2. CCS compiler crashes, during compilation in MPLAB.

3. MPLAB simulator crashes while simulating the compiled CCS program.

4. Your program crashes while running in an actual PIC.
a.mattioli



Joined: 19 Jun 2007
Posts: 4

View user's profile Send private message

my program crashes while running in an actual PIC
PostPosted: Tue Jun 26, 2007 2:05 am     Reply with quote

PCM programmer:
my program crashes while running in an actual PIC: its reboot continually
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jun 26, 2007 2:15 am     Reply with quote

You have the watchdog enabled. Does the program still crash when you disable the watchdog?
a.mattioli



Joined: 19 Jun 2007
Posts: 4

View user's profile Send private message

RTOS with serial comunication
PostPosted: Tue Jun 26, 2007 9:33 am     Reply with quote

I have disabled Watch DogTimer, but I don't resolve the problem. Then I think that the problem is the serial comunication.
I use RTOS with:

#use rtos(timer=1,minor_cycle= 5 ms)
#task(rate= 5 ms,max= 5 ms) //first and only task

Into this task I send to RS232 many string and I control also the input and output signal:

printf("Hello World!");

I have prove to stand up the time_ticks but not change.

Where is the problem?
Thank you
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