Page 1 of 1
A question about eeprom
Posted: Tue Aug 01, 2017 1:39 pm
by maxtisc
A question about eeprom
Hello everyone
If the eeprom data are organized in 8 bits how do i save a number greater than 255?
I have thought to do this for example if I have to save 1234 except for the first address 1 on the second 2 on the third 3 and on the fourth 4 when I go to read the individual leases I do
1 * 1000
2 * 100
3 * 10
4 * 1
Then sum up all the values getting 1234
Is this correct or does a better way to do this?
thank you
Re: A question about eeprom
Posted: Tue Aug 01, 2017 2:18 pm
by medelec35
Hi maxtisc,
You can use two EEPROM memory locations to store any integer value.
Take a look at
this thread.
I'm sure there are other threads as well.
Martin
Re: A question about eeprom
Posted: Tue Aug 01, 2017 6:08 pm
by maxtisc
Hi Martin
Thanks for your post is very interesting, I did some simple tests and works very well
thank you so much
Re: A question about eeprom
Posted: Tue Aug 01, 2017 6:10 pm
by medelec35
Your welcome.
Glad I can help.
Martin.
Re: A question about eeprom
Posted: Wed Aug 16, 2017 12:58 pm
by maxtisc
Hi Martin
I tried to transfer the concept of post to hardware (arduino 2560 V3 + nextion display ) but it does not work, in simulation it works fine.
In my opinion there is a bug on the management of the internal eeprom
I attach a simple test file maybe you see something that is not set correctly
thanks
Re: A question about eeprom
Posted: Wed Aug 16, 2017 2:14 pm
by medelec35
Hi maxtisc,
Do you want to see if attached works any better?
Martin
Re: A question about eeprom
Posted: Wed Aug 16, 2017 2:44 pm
by maxtisc
Thank you for your interest
Unfortunately, it does not work
Re: A question about eeprom
Posted: Thu Aug 17, 2017 10:02 am
by Benj
Hello,
Can you tell us exactly what the hardware is doing?
it does not work
Doesn't give us much to go on.
Re: A question about eeprom
Posted: Thu Aug 17, 2017 3:42 pm
by maxtisc
Hello
In the small test program only the serial 232 n ° 1 is used to command the nextion display.
Then in the original program in the eeprom will be saved the set_points that will be called up when the system restarts, via the modifier keyboard the setpoints I see are regularly saved in the volatile memory but the program restarts only incorrect values, so I did a program Part to test only the eeprom function
thanks
Re: A question about eeprom
Posted: Fri Aug 18, 2017 12:18 pm
by Benj
Hello,
The value should be 257 when you program the device (0x0101) and that is the value the simulation is giving. What value is your hardware generating when you program the device?
Re: A question about eeprom
Posted: Fri Aug 18, 2017 3:41 pm
by maxtisc
hello
The given value is always 0
Re: A question about eeprom
Posted: Sun Aug 20, 2017 10:40 am
by medelec35
Do you have a programmer that will allow you to read EEPROM contents so you can verify that EEPROM addresses contain correct values?
No point in reading EEPROM is values stored are incorrect.
This is my EEPROM test Flowchart.
I could expand it to cover number higher than 255
Martin
Re: A question about eeprom
Posted: Sun Aug 27, 2017 4:33 pm
by maxtisc
Hello
I do not have an eeprom reader
I solved my problem with a 24c64 memory that works in I2C and works fine, with internal memory not working to save data.
thank you