Good night,
I have a problem with my dsPIC33.
I when I turn on the dsPIC33 short time he turns off and then on again. And is always be connect and disconnect yourself. What can be?
Best Regards,
Emanuel Lourenço
Problem dsPIC33
Moderator: Benj
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Problem dsPIC33
Hello Emanuel,
I think I can see why your having problems.
Your main macro calls the Menu macro, Your Menu macro calls the Parametros macro, Your Parametros macro calls the Menu macro.
This cyclic calling of macros will eventually eat up all your stack space and then the program will fall over in unpredictable ways.
You should try and always return to the main function if possible and use a loop to ensure your program loops forever.
Main -> Menu
Main -> Parametros
Main -> Menu
...
or
Main -> Menu -> Parametros
Main -> Menu -> Parametros
...
I think I can see why your having problems.
Your main macro calls the Menu macro, Your Menu macro calls the Parametros macro, Your Parametros macro calls the Menu macro.
This cyclic calling of macros will eventually eat up all your stack space and then the program will fall over in unpredictable ways.
You should try and always return to the main function if possible and use a loop to ensure your program loops forever.
Main -> Menu
Main -> Parametros
Main -> Menu
...
or
Main -> Menu -> Parametros
Main -> Menu -> Parametros
...
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel