I added a couple things, messes up your averaging part (never gets there now) but maybe this will help.
Other than that it is looking good!!!!
Code:MC_S: 'MC Starts subroutine READ 12, M_s 'Read current number of M/C Starts LET M_S = M_S + 1 'Increment value by one '####### IF M_S > 5 THEN M_S = 0 ENDIF '####### WRITE 12, M_S 'Save new value READ 12, M_s 'Read latest value pause 150 'Give LCD a chance to Power_up LET M_S = M_S 'Set value to display LCDOUT $FE,$C0, "Machine Starts=",DEC M_S 'Display M/C Starts on LCD from EEPROM RETURN Power_up: 'Power_up subroutine Read 0, Total.HIGHBYTE ' Read high byte Read 1, Total.LOWBYTe ' Read low byte '####### IF TOTAL > 5000 THEN TOTAL = 0 ENDIF '####### LET Total = Total 'Set Total to value set in EEPROM Memory pause 150 'Give LCD a chance to Power_up LCDOUT $FE,2,"Total=",DEC Total 'At Power_up display Total on LCD from EEPROM 'Memory which has been stored since Power_down return





Bookmarks