I'm trying to store a numeric variable into a PIC18F2550 EEPROM.
I would like to store the variable and then call it later on.
This is what i use to store the variable
And to ReadCode:DelayIn VAR WORD Delayin = 120 ' This is in Seconds Write 5, Delayin.Byte0 Write 6, Delayin.Byte1
If the variable was set at 120, i would expect the pause around 120seconds (2mins) before the LED flashed, but its only around 53 seconds. Therefore i am guessing i am not storing the variable correctly.Code:Procedure: Read 5, DelayOut.byte0 Read 6, DelayOut.Byte1 Pause DelayOut * 1000 ' Multiply DelayIn by 1000 to give seconds For Loop = 1 to 5 Red = 1 Pause 100 Red = 0 Pause 100 Next Loop Return
I've checked the manual and this is the example it gives.
Is there a better way of completing this type of task?
Thanks




Bookmarks