vicvicvar
Newbie level 1
- Joined
- Aug 5, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 15
Hey guys Im working on this code
void subroutine1()
{
//something goes here ( a lot of code )
}
void subroutine2()
{
//something goes here ( also a lot of code)
}
void subroutine()
{
//something goes here too with a lot of code
}
void main()
{
//Configuration bits here etc etc
while(1)
{
if(condition1)
{
if(condition2)
....................{
......................subroutine1();
......................subroutine2();
................................if(condition4)
................................{
................................subroutine3();
................................subroutine1();
................................}
...................}
...................if(condition1)
..................{
...................subroutine1()
...................subroutine3()
..................}
.......}
}
}
Im using the easy pic 7 to download the code to the 18f45k22 . The easy pic do download the code but is not working but if I remove some subroutines it will work with just a few. I dont know if the program counter gets overflowed when calling many subroutines with a lot of code in them and having all this inside IF conditional statement.
Do you know whats happening ? thanks !
void subroutine1()
{
//something goes here ( a lot of code )
}
void subroutine2()
{
//something goes here ( also a lot of code)
}
void subroutine()
{
//something goes here too with a lot of code
}
void main()
{
//Configuration bits here etc etc
while(1)
{
if(condition1)
{
if(condition2)
....................{
......................subroutine1();
......................subroutine2();
................................if(condition4)
................................{
................................subroutine3();
................................subroutine1();
................................}
...................}
...................if(condition1)
..................{
...................subroutine1()
...................subroutine3()
..................}
.......}
}
}
Im using the easy pic 7 to download the code to the 18f45k22 . The easy pic do download the code but is not working but if I remove some subroutines it will work with just a few. I dont know if the program counter gets overflowed when calling many subroutines with a lot of code in them and having all this inside IF conditional statement.
Do you know whats happening ? thanks !