|
|
View previous topic :: View next topic |
Author |
Message |
mlezamir Guest
|
while loop |
Posted: Thu Jul 24, 2003 2:44 pm |
|
|
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 |
Posted: Thu Jul 24, 2003 2:49 pm |
|
|
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 |
Posted: Thu Jul 24, 2003 2:59 pm |
|
|
:=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 |
|
|
|
|
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
|