Re: Can I change the code in running application? 8052/ 89S5
ark5230 said:
To control the delay externally, the values of R2 and R3 are to be changed under external control. If this is the issue then the approach could be to to load the value from some ram location into R2 and R3. The ram locations could be modified during run time under external control.
You mean, I follow something like this...
* First Load R0 & R1 with some RAM pointer (say R0= 40h & R1=41h).
* Load 10h @R0, (For R2=10h) & Load 20h @R1, (For R3=20h).
* When switch1 or switch2 is pressed, I should Increment R2 or R3.
* Then again move these values @R0 & @R1 respectively.
* Again make R2=@R0 & R3=@R1.
* This will load updated values in R2 & R3, No doubt.
But, If I change the values during running application & load those into RAM, will those values be restored after Power is switched Off/On.
I want to write to Flash ROM. Also I'm neither using any Eprom nor I wish to use any.
If the changed values are restored after Power on, then above code will definately do.
Thanks.
Sandy
:arrow: Also let me tell the purose of this excercise. Presently I'm using as many as 5 pins for selecting various time delays. I thought, doing something in the running application may relieve 3 pins, which could be used for some other function. :!: