Thanks for the advice everybody :-)

I use pic_data_eeprom.jal librery and it work very well. 

Actually, I use the microcontroller for a gear controls. The EEPROM memory 
is use to store the gears break point and others parameters. So, I will 
write on the EEPROM maximum a hundred times depending on the test which 
will be do.

Now, I've got another question about the offset 
(data_eeprom_write_dword(<offset>,<dword>)). How long have to be the offset 
for a dword ?
I mean, in the example, the storage is every 1 offset ( i = i + 1 ) and the 
counter is stored in a byte. So if I want to write a dword in the EEPROM 
memory, I need a 4 offset ?

Kind regards,
Sébastien.
 


On Wednesday, April 4, 2012 3:34:07 PM UTC+2, [email protected] wrote:
>
> Hello,
>
>
> I need information about non-volatile memory.
>
> Firstly, this is one part of my program. It'll be easier to explain my 
> problem :
>
> if (SAU_A == high & SAN_A == high) then
>    n = 1
>    repeat
>    if (n==1 & SAD_A == high) then
>       repeat
>       first = adc_read(0)               <---<---<---
>       until(SAD_A == low)
>       n = n+1
>    end if
>    fd = first - ramin
>    fu = first + ramax
>    until(SAU_A == low)
> end if
>
>
> So when I push on the buttons (SAN_O, SAU_O and SAD_O), it allow to read 
> the analog input and save the value into variable first (var dword first) 
> (see line with the arrows). 
> The problem is that when I turn off the micro-controller (remove the 
> battery) it looses the variable first. I would like to keep in memory the 
> variable even if I turn off the micro-controller. 
> Do you know how can I put the value in the eeprom or something equivalent ?
>
>
> Kind regards,
>
> Sébastien
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/jallib/-/SfqJ0-ZQW8wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to