One more for tonight before I throw this poxy project out the window.

why does WRITE 10,lightsetHR[1] work when WRITE 10,white_on_time_h cause the illegal error ?

I've changed the code to the following:
Data statement:
Code:
data @0
    data    00      'Blue fade IN duration hours
    data    30      'Blue fade IN duration minutes
    data    00      'Blues fade OUT duration hours
    data    30      'Blue fade OUT duration minutes
    data    00      'Whites fade IN duration hours
    data    30      'Whites Fade IN duration MINS
    data    00      'Whites Fade OUT duration HOURS
    data    30      'Whites Fade OUT duration MINS
    data    255     'Blue MAX Intensity %
    data    255     'Whites MAX Intensity %
    data    14      'Whites ON time hours
    Data    00      'Whites ON time minutes
    data    15      'Whites OFF time hours
    Data    00      'blue OFF time minutes
    Data    14      'blue ON time hours
    data    01      'blue ON time minutes
    data    14      'blue OFF time hours
    Data    20      'blue OFF time minutes
Read statement:
Code:
Read 0,fadesetHR[0]    'Blue fade IN duration hours
Read 1,fadesetMN[0]    'Blue fade IN duration minutes
Read 2,fadeoutHR[0]    'Blue fade OUT duration hours
read 3,fadeoutMN[0]    'Blue fade OUT duration minutes

read 4,fadesetHR[1]    'Whites fade IN duration hours
read 5,fadesetMN[1]    'Whites fade IN duration minutes
read 6,fadeoutHR[1]    'Whites fade OUT duration hours
read 7,fadeoutMN[1]    'Whites fade OUT duration minutes

Read 8,B_max
Read 9,W_max

Read 10,white_on_time_h              'Whites ON time hours
Read 11,white_on_time_m              'Whites ON time minutes
read 12,white_off_time_h             'Whites OFF time hours
read 13,white_off_time_m             'Whites OFF time minutes
read 14,blue_on_time_h             'blue ON time hours
read 15,blue_on_time_m             'blue ON time minutes
read 16,blue_off_time_h            'blue OFF time hours
read 17,blue_off_time_m            'blue OFF time minutes
Write statements

Code:
write 0,fadesetHR[0]    'Blue fade IN duration hours
write 1,fadesetMN[0]    'Blue fade IN duration minutes
write 2,fadeoutHR[0]    'Blue fade IN duration hours
write 3,fadeoutMN[0]    'Blue fade IN duration minutes

write 4,fadesetHR[1]    'Whites fade IN duration hours
write 5,fadesetMN[1]    'Whites fade IN duration minutes
write 6,fadeoutHR[1]    'Whites fade IN duration hours
write 7,fadeoutMN[1]    'Whites fade IN duration minutes

write 8,B_max
write 9,W_max

write 10,lightsetHR[1]
write 11,lightsetMN[1]
write 12,lightoffHR[1]
Write 13,lightoffMN[1]

write 14,lightsetHR[0]
write 15,lightsetMN[0]
write 16,lightoffHR[0]
Write 17,lightoffMN[0]
I then have the following section as part of the initialization before the main program loop
Code:
lightsetHR[0] = Blue_On_Time_H
lightsetMN[0] = Blue_On_Time_M
lightsetHR[1] = White_On_Time_H
lightsetMN[1] = White_On_Time_M

lightoffHR[0] = Blue_Off_Time_H
lightoffMN[0] = Blue_Off_Time_M
lightoffHR[1] = White_Off_Time_H
lightoffMN[1] = White_Off_Time_M
And in the main program loop

Code:
Blue_on_Time =(lightsetHR[0]*60)+lightsetMN[0]
Blue_off_time = (lightoffHR[0]*60)+lightoffMN[0]
 
White_on_Time =(lightsetHR[1]*60)+lightsetMN[1]
White_off_time = (lightoffHR[1]*60)+lightoffMN[1]

This compiles fine, and when first run the case changes at the value set in the data statement, and the LCD displays the correct value for Blue on time (eg 842 for 14:02). But when I set the on time up via the menu, even though the LCD displays the new value for blue_on_time correctly (eg 845 for 14:05 as set via the menu) it still fails to trip the case statement at the new time.

Any ideas ?