Hi.
I use a PIC18F45K80 @ 64MHz.
I have a seperate pbp file with my LCD menu code, witch I include at the end of my main code.
In my menu file I declare some variables and initialize them.
The strange thing is that not all of the variables get initialized so I have to initialize them again.
Is there anything wrong with the way I initialize the variables?
For example the variable go_back doesnt get set to 0 the first time.
Code:
'************************ VARIABLES *****************************
btn_debounce var byte : btn_debounce = 50
btn_rpt_start_time var word : btn_rpt_start_time = 300
btn_rpt_time var byte : btn_rpt_time = 100
show_menu var byte : show_menu = 0
menu_var var word : menu_var = 0
menu_var_min var word : menu_var_min = 0
menu_var_max var word : menu_var_max = 0
btn_repeat var bit : btn_repeat = 0
btn_repeat_quick var bit : btn_repeat_quick = 0
btn_released var bit : btn_released = 0
go_back var bit : go_back = 0 'THIS INITIALAZATION DOESNT WORK, IT'S INITIALIZED AS 1
'****************************************************************
'***************** MENU SUB ROUTINE ********************
'****************************************************************
'menu
menu:
go_back = 0 'BUT THIS DO
while go_back = 0
select case show_menu
case 0
.......
.......
Regards
/Matias
Bookmarks