Hi All
I have included a cut down version of the program I am working on... it will be a function generator. In this project zipped and attached I have included code that holds only the functionality for a menu. The way I envisaged this was that the LCD would scroll through a list (in this case only three options) and if the user pressed the "#" while an option was on the screen then it jumps out and performs an LCD display for that option and then ends up in an endless loop. The option that has been set up for this is called "NEW START UP FREQUENCY". So by pressing the "3" button while that option displays it should jump out... however...
It never jumps out when you press the "#" button. It stays in the loop. It uses an interrupt routine that works normally and when you press the button it only hesitates for a moment.
So something happens in the routine "MENU" and/or "MENU_INTERRUPT".
I have stripped this down fairly rapidly but it still compiles and works on the board so no bugs... hopefully. The interrupts are set in PIC_INIT.
I am hoping someone might have a look and find something obvious...
Thanks
Simon
View attachment FUNCTION_GEN_MAIN_PROGRAM 1-1.zip
I have included a cut down version of the program I am working on... it will be a function generator. In this project zipped and attached I have included code that holds only the functionality for a menu. The way I envisaged this was that the LCD would scroll through a list (in this case only three options) and if the user pressed the "#" while an option was on the screen then it jumps out and performs an LCD display for that option and then ends up in an endless loop. The option that has been set up for this is called "NEW START UP FREQUENCY". So by pressing the "3" button while that option displays it should jump out... however...
It never jumps out when you press the "#" button. It stays in the loop. It uses an interrupt routine that works normally and when you press the button it only hesitates for a moment.
So something happens in the routine "MENU" and/or "MENU_INTERRUPT".
I have stripped this down fairly rapidly but it still compiles and works on the board so no bugs... hopefully. The interrupts are set in PIC_INIT.
I am hoping someone might have a look and find something obvious...
Thanks
Simon
View attachment FUNCTION_GEN_MAIN_PROGRAM 1-1.zip