eeprom problem on new patch

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

eeprom problem on new patch

Post by lordhex »

Hello i am useing 16F877 or 18F452 none of them can write eeprom or read again can you check it benj.
Also in simulation before patch i can check it stop the program start again eeprom was reading.
After patch i can't do it in simulation or in real life.

User avatar
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: eeprom problem on new patch

Post by Benj »

Hello,

In the 6.0.9 patch a new property was added to the EEPROM component which is used to specify the defaults for simulation and download. Could it be this that is causing you problems? If you remove the contents of the Initial Values property then does this help to solve the issue?

lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: eeprom problem on new patch

Post by lordhex »

in simulation problem gones but real life still continue :(
I tryed so many times also the sample program in simulation working but in real life can't there was an old program working with eeprom
it was working perfect in real life.
I opened in 6.09 make a new hex and upload to chip then stop to write eeprom i think there is a mistake benj can you check it in real life?
becouse this is the firs time in simulation working in real life can't.

lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: eeprom problem on new patch

Post by lordhex »

i tryed may be 100 times eeprom write or read not working.....(in real life not simulator)

User avatar
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: eeprom problem on new patch

Post by Benj »

Hello,

I've just tried the attached program running on a 16F877A and generated with 6.0.9 and it's working great on the hardware.
EEtst.fcfx
(6.81 KiB) Downloaded 212 times
Could you post your program that demonstrates the problem and I will see if I can work out what's going wrong.

lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: eeprom problem on new patch

Post by lordhex »

Flowcode1.fcfx
(16.56 KiB) Downloaded 231 times
Benj i tryed everything i can't find the problem :(
i can't write durum =1 or read after write i do not know can you check it?

User avatar
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: eeprom problem on new patch

Post by Benj »

Hello,

There are a lot of EEPROM writes in your program. The EEPROM memory on the 16F877A is only good for about 10,000 erase/write cycles so with the amount your writing in your program you might be coming up on this value quite quickly.

Can you try using different EEPROM locations just in case locations 0 and 1 have been burnt out on your device and try reducing the amount of writes to the EEPROM. e.g. instead of writing the value in the loop wait until the correct value has been reached and then write once to the EE memory.

lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

Re: eeprom problem on new patch

Post by lordhex »

Ok i will try to make it less write :(

User avatar
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: eeprom problem on new patch

Post by Benj »

Hello,

Sorry to be the bearer of bad news

If you have only 1 write to the EEPROM every minute it would give you an expected working life of 100,000 minutes or 2.4 months of operation.

Up this to once per second and the expected lifespan drops to 1.15 days of operation.

If you need to write and re-write over and over again to none volatile memory and have the device function a long time then an external flash IC might be a better way to go about it as you can write to these pretty much indefinitely and do not loose the contents when powered down.

The bigger chips can be a bit hard to program due to all the paging issues but if you need a long term solution then this might be a good way to go.

Another option would be to periodically move to a new EEPROM address and use the first couple of bytes of EEPROM to point to the current valid location. You would also need to store the amount of time that we have been at that location. This way you don't burn out specific locations and hopefully significantly improve the working life.

Post Reply