hi..
i want to save a value in pic16f84a, and if i cut off the power, the value must be still saved.
how can i do this??
hi..
i want to save a value in pic16f84a, and if i cut off the power, the value must be still saved.
how can i do this??
Dave
Always wear safety glasses while programming.
When you are first programming the chip, use the EEPROM command. Do this to set an initial value, don't depend upon it being zero from the factory. To change it while your program is running use the Write command, and to read your value use Read.
Jerry.
If your oscilloscope costs more than your car...
I might misunderstand you, but you just want to save a value in a PIC16F84 to use again after powerdown ?
Why not use the WRITE and READ command. ?
Below is some code snippets I use on a motor control.
When I switch power off I want to keep a value for the next time I switch power on again.
==== Start of program ====
...
...
read 1, Min_Start 'Read stored value of Minimal start speed
if Min_Start=255 then Min_Start=0 'Min_start was not stored
...
...
...
Write 1, Min_Start 'Somewhere in program the value is written.
'to Location 1
================================================== ========
JanH..
i used this method as you wrote, and like you for control stepper motor.
but it did not work.
i posted a thread " problem with stepper " and attached my code for this.
here is my code, you can see and say.
Last edited by ibra; - 10th August 2007 at 10:14.
Bookmarks