Hi Charles,
Sorry, please bear with me as this is the first time I've experimented with saving data other than when programming mode.
I want to save the following to the PIC once the user has set them so that in the event of a power failure they are remembered and the user doesn't have to re-enter the data.
However as the program writes data to the memory at the time of programming and as part of the RTC settings (data@ 0,0 and data@150 respectively) I'm not sure what value to place before the colon after the word statement for each of the above. I don't want to corrupt the data stored at those data locations.Code:save: Lcdout $FE,2 LCDOUT $FE,$80,"Saving Settings" for fn= 0 to 3 write ,lightsetHR[fn] write ,lightsetMN[fn] write ,lightoffHR[fn] write ,lightoffMN[fn] write ,droptemp[fn] write ,normtemp[fn] write ,StartHour[fn] write ,StartMin[fn] write ,StopHour[fn] write ,StopMin[fn] next fn pause 150 goto mainmenu
For example - 0x50 address in that table appears blank (FF) - so could I use
Or whatever decimal 0x50 would be ???Code:write 0x50 ,lightsetHR[fn]
Hope that's clear ?
Oh and I'm using DT's interrupts... would I need to use DEFINE WRITE_INT 1 withing that sub-routine ?




Bookmarks