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

16F877 resets itself?

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



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

16F877 resets itself?
PostPosted: Fri Mar 04, 2005 6:39 am     Reply with quote

I use the 16f877 with version 3.212 . I use timer0,1,2 interrupts and also
rs232 receive interrupts. Not always, But sometimes pic resets itself. Is it normal? what can be the reason for this. My code is really big. it makes multifunctions. I hope this error coming from rs232. Please looking this view. Thanks a lot up to now. Byee...
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 04, 2005 6:48 am     Reply with quote

Quote:
Is it normal?
No
Quote:
what can be the reason for this
WDT timeout, brownout, noise, bad code, and the list goes on
Quote:
My code is really big. it makes multifunctions
Shouldn't cause any resets because of this but will make it more difficult to determine.


The fact that you said RS232, I would look to see that I am not overrunning any buffers. Also make sure the the WDT is off and that you specified NOLVP in your fuses.
sraiderk



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

PostPosted: Fri Mar 04, 2005 7:04 am     Reply with quote

Thanks Mark for your reply. I accept your idea. I use the fuse like the following.

#fuses HS, NOPROTECT, BROWNOUT,LVP,WRT

My question I don't know the meaning in using

LVP:Low Voltage Programming enable bit ?
sraiderk



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

PostPosted: Fri Mar 04, 2005 7:07 am     Reply with quote

Thanks Mark for your reply. I accept your idea. I use the fuse like the following.

#fuses HS, NOPROTECT, BROWNOUT,LVP,WRT

My question I don't know the meaning in using

LVP:Low Voltage Programming enable bit ?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 04, 2005 9:17 am     Reply with quote

It is doubtful then you are using it. You need to change LVP to NOLVP. If you don't, a change on the LVP pin will cause problems.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Fri Mar 04, 2005 10:16 am     Reply with quote

Also check the C/Asm list file. Near the top, the compiler will tell you how many stack locations your program will use. The 16 series chips only have an 8 level stack. If your program is trying to use more than 8 locations, it will hang and eventually the watchdog will reset the pic. This may be the cause of what you're seeing.
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