Richard / Henrik
Code is now working. This is the data section
Then the read statementCode:'******************************************************************************* ' Data presets '******************************************************************************* 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 word 842 'Blue ON time Data word 841 'Whites ON time data word 1200 'Blue OFF time Data word 1200 'White OFF time
I then have a simple test line ofCode: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,Blue_on_Time.lowbyte read 11,Blue_on_Time.highbyte read 12,white_on_Time.lowbyte read 13,white_on_Time.highbyte read 14,Blue_off_Time.highbyte read 15,Blue_off_Time.lowbyte read 16,white_off_Time.lowbyte read 17,white_off_Time.highbyte Return
This shows the value for Blue_on_time as 842, and the counter starting at 840 as per the data statement. When the counter reaches 842 the case statement changes as required.Code:lcdout $FE,$D4+11,dec Counter1 lcdout $FE,$D4+16,dec Blue_on_Time
Thank you both, and I apologise for putting you guys to so much trouble having tested parts of the code on various chips. Your guidance and input on my posts have been much appreciated
Malcolm




Bookmarks