Mission clarification
Power UP
Read EEPROM
Transfer value from EPROM to VAR
Press Button
VAR adds one to it's self
Display VAR on LCD
Write VAR to EEPROM
Wait for another Button press
This message will self destruct in.....
Mission clarification
Power UP
Read EEPROM
Transfer value from EPROM to VAR
Press Button
VAR adds one to it's self
Display VAR on LCD
Write VAR to EEPROM
Wait for another Button press
This message will self destruct in.....
Dave
Always wear safety glasses while programming.
Hi mackrackit,
I've not been able able to look at the project this weekend due to a family issue.
Will be back 'on mission' tomorrow all being well.
Dave
Yup, family comes first. In the end that is all we got.
Hope things turn out well.
Dave
Always wear safety glasses while programming.
Never a truer word....Yup, family comes first. In the end that is all we got.
Thank you and they have I'm very relieved to say.Hope things turn out well.
Back on the case tomorrow after a good nights sleep.
Dave
Hi mackrackit,
Things pretty much back to normal here (panic over)
So here's the first part of the brief, I think it covers these components:
I didn't want to try and do any more just in case I'm wildly off track on this, what do you think? I've left out all the DEFINES for clarity.Power UP: Read EEPROM: Transfer value from EPROM to VAR: Press Button:
VAR adds one to it's self: Display VAR on LCD
DaveCode:Total var word ' Data variable B1 VAR BYTE 'Stored DATA address clear 'Re_set volatile memory to zero (Not EEPROM?) MAIN: gosub Power_up 'On Power_up GOTO READ EEPROM subroutine Start: if PORTA.5 = 0 then count_up: 'If button pressed start counting IF PORTA.5 = 1 THEN Start: 'If button not pressed loop until it is Count_up: 'Button has been pressed let Total = Total + 1 'Add one to value of Total taken from EEPROM LCDOUT $FE,1 'Clear LCD LCDOUT $FE,$C0,DEC Total 'Display Total on LCD PAUSE 500 GOTO Start: Power_up: 'Power_up subroutine Read B1, Total.HIGHBYTE ' Read high byte Read B1+1, Total.LOWBYTe ' Read low byte LET Total = Total 'Set Total to value set in EEPROM Memory return
Last edited by LEDave; - 4th May 2010 at 17:42.
Glad to hear things are back to normal.
A quick look and it looks OK, might want to add a WRITE to EEPROM routine though...
Dave
Always wear safety glasses while programming.
Bookmarks