Doing some testing with EEPROM, so made a quick prog to store a value to EEPROM and retrieve it on powerup, all works fine in the panel but on the chip the value is lost (it returns the address instead of the data. Any clues...?
EEPROM on 16F872
Moderator: Benj
-
- Posts: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
-
- Posts: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
Re: EEPROM on 16F872
Here is the FC4 file
- Attachments
-
- FLASH.fcf
- EEPROM TEST
- (11.5 KiB) Downloaded 237 times
- 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 on 16F872
Hi Andy
The EEPROM will get erased during programming by default. Could this be the cause of the problem.
Or is it also getting erased on a reset?
If you need to disable the programming EEPROM erase then information an be found on this here.
http://www.matrixmultimedia.com/mmforum ... ROM#p17227
The EEPROM will get erased during programming by default. Could this be the cause of the problem.
Or is it also getting erased on a reset?
If you need to disable the programming EEPROM erase then information an be found on this here.
http://www.matrixmultimedia.com/mmforum ... ROM#p17227
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: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
-
- Posts: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
-
- Posts: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
- 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 on 16F872
Hi Andy
It is unlikely to be a chip problem unless you have had it for a while or it has been a bit abused in the past.
I will get one of these devices and see if I can find out whats going wrong.
It is unlikely to be a chip problem unless you have had it for a while or it has been a bit abused in the past.
I will get one of these devices and see if I can find out whats going wrong.
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
- 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 on 16F872
Hello Andy
I have had a quick dig around and may have a solution to the problem.
Please can you try the following.
Open the 16F872.fcd file from the "C:\Program Files\Matrix Multimedia\Flowcode vx\FCD\" folder in a text editor and then scroll down to the [Defines] section.
At the bottom of this section add the line
Define22=#define MX_EE_TYPE2
Save the file, restart Flowcode and re-compile to your target. Hopefully the problem will now be resolved on the hardware.
let me know how you get on
I have had a quick dig around and may have a solution to the problem.
Please can you try the following.
Open the 16F872.fcd file from the "C:\Program Files\Matrix Multimedia\Flowcode vx\FCD\" folder in a text editor and then scroll down to the [Defines] section.
At the bottom of this section add the line
Define22=#define MX_EE_TYPE2
Save the file, restart Flowcode and re-compile to your target. Hopefully the problem will now be resolved on the hardware.
let me know how you get on
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: 18
- Joined: Wed Jan 06, 2010 2:59 pm
- Contact:
Re: EEPROM on 16F872
Hi Ben,
Yes that sorted it, thank you.
Do such fixes find their way into future versions?
Thanks
Andy
Yes that sorted it, thank you.
Do such fixes find their way into future versions?
Thanks
Andy
- 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 on 16F872
Hello Andy,
Yes I will make sure that this makes it into the next release.
Yes I will make sure that this makes it into the next release.
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