A question about eeprom
Moderator: Benj
-
- Posts: 110
- Joined: Mon Dec 23, 2013 9:34 pm
- Has thanked: 2 times
- Been thanked: 9 times
- Contact:
A question about eeprom
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
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
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: A question about eeprom
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
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
Martin
-
- Posts: 110
- Joined: Mon Dec 23, 2013 9:34 pm
- Has thanked: 2 times
- Been thanked: 9 times
- Contact:
Re: A question about eeprom
Hi Martin
Thanks for your post is very interesting, I did some simple tests and works very well
thank you so much
Thanks for your post is very interesting, I did some simple tests and works very well
thank you so much
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- Posts: 110
- Joined: Mon Dec 23, 2013 9:34 pm
- Has thanked: 2 times
- Been thanked: 9 times
- Contact:
Re: A question about eeprom
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
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
- Attachments
-
- PROVA_BYTE.fcfx
- test eeprom
- (7.31 KiB) Downloaded 212 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: A question about eeprom
Hi maxtisc,
Do you want to see if attached works any better?
Martin
Do you want to see if attached works any better?
Martin
- Attachments
-
- PROVA_BYTE V2.fcfx
- (7.5 KiB) Downloaded 204 times
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: A question about eeprom
Hello,
Can you tell us exactly what the hardware is doing?
Can you tell us exactly what the hardware is doing?
Doesn't give us much to go on.it does not work
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 110
- Joined: Mon Dec 23, 2013 9:34 pm
- Has thanked: 2 times
- Been thanked: 9 times
- Contact:
Re: A question about eeprom
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: A question about eeprom
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: A question about eeprom
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
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
- Attachments
-
- 16f1937 EEPROM Test1.fcfx
- (10.67 KiB) Downloaded 216 times
Martin
-
- Posts: 110
- Joined: Mon Dec 23, 2013 9:34 pm
- Has thanked: 2 times
- Been thanked: 9 times
- Contact:
Re: A question about eeprom
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
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