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

while loop

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







while loop
PostPosted: Thu Jul 24, 2003 2:44 pm     Reply with quote

Hello,
I have an infinite while loop in my program, but somehow it keeps jumping out of the while loop. My code looks like this:

void main(){
Code Segment A
.
.
.
while(1){

Code Segment B
.
.
.
}
}

I want it to keep executing segment B, but somehow it keeps jumping back to segment A or I guess it just keeps starting over. Does anyone know why?

mle
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516325
Sherpa Doug
Guest







Re: while loop
PostPosted: Thu Jul 24, 2003 2:49 pm     Reply with quote

Could it be the watchdog timer? Could some noise on MCLR be causing a reset? Is power supply noise causing a restart?

Just some places to start looking....

SherpaDoug

:=Hello,
:=I have an infinite while loop in my program, but somehow it keeps jumping out of the while loop. My code looks like this:
:=
:=void main(){
:=Code Segment A
:=.
:=.
:=.
:=while(1){
:=
:= Code Segment B
:= .
:= .
:= .
:=}
:=}
:=
:=I want it to keep executing segment B, but somehow it keeps jumping back to segment A or I guess it just keeps starting over. Does anyone know why?
:=
:=mle
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516326
mlezamir
Guest







Re: while loop
PostPosted: Thu Jul 24, 2003 2:59 pm     Reply with quote

:=Could it be the watchdog timer? Could some noise on MCLR be causing a reset? Is power supply noise causing a restart?
:=
:=Just some places to start looking....
:=
:=SherpaDoug
:=
:=:=Hello,
:=:=I have an infinite while loop in my program, but somehow it keeps jumping out of the while loop. My code looks like this:
:=:=
:=:=void main(){
:=:=Code Segment A
:=:=.
:=:=.
:=:=.
:=:=while(1){
:=:=
:=:= Code Segment B
:=:= .
:=:= .
:=:= .
:=:=}
:=:=}
:=:=
:=:=I want it to keep executing segment B, but somehow it keeps jumping back to segment A or I guess it just keeps starting over. Does anyone know why?
:=:=
:=:=mle

it was the watchdog timer, thanks.
mle
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516329
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