Hoping that someone can shed light on a problem that I haven't got with previous project using a 18F46K22 but is giving me real grief using a 18F6722 with exactly the same code.
What I'm trying to do is to write to the Eeprom with a preset large number by breaking the number into 3 sets of smaller numbers and then writing to 3 separate locations in the Eeprom. On a re-boot, to read those locations and reconstruct the large number. I learned with the first project that I need to test if its the first read following programming so I read location 0 and if 0, to write the large number into the Eeprom once only and from there on in, to read only.
Although the code works fine with a 18F46K22, what I'm seeing with the 18F6722 is it loads the large number OK (display shows 55831m as expected) following programming but on subsequent re-boots, I get a different number each time I boot.
I've attached a very cut down version of what I'm trying to achieve.
Thanks for any light that can be shed on this, its driving me potty particularly when the original code has been running for 2 years now!!!
Eeprom funnies
Moderator: Benj
-
- Posts: 55
- Joined: Tue Apr 01, 2014 9:10 am
- Has thanked: 16 times
- Been thanked: 18 times
- Contact:
- tiny
- Posts: 200
- Joined: Wed Jul 08, 2009 8:29 am
- Has thanked: 51 times
- Been thanked: 93 times
- Contact:
Re: Eeprom funnies
Try to delete the initial values (eeprom1 Properties) at the EEprom, then it should work. At least when testing with your file, it worked.
Christina
Christina
-
- Posts: 55
- Joined: Tue Apr 01, 2014 9:10 am
- Has thanked: 16 times
- Been thanked: 18 times
- Contact:
Re: Eeprom funnies
Brilliant, many thanks for your reply. Still learning so really value inputs from the more experienced
Chris
Chris