PIC EEPROM does not store data

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

PIC EEPROM does not store data

Post by Leong NyukWah »

Hi,
I need some expert advise here to help me solve the above problem. Recently I had done some FC programming invole making use of the EEPROM write & read instruction. I encountered with the problem not be able to read out stored data from the EEPROM that had written with some data before. The FC program works fine with the FC simulation. When I download the program into the 16F877A PIC , the program step works fine as expected but the only things happen is I fail to retrieve data from the EEPROM. I had tried to carry out the same test with the "EEPROM test for 16F88" download from the wed, the result is the same, ie. its works find with FC simulation but can't retrieve the number "55" from the EEPROM. In the LCD display should display with the number "55" on the first and second line. Now it only displays "55" on the first line and "zero" at the second line, which means the EEPROM is not storing this number.
Any advise is welcome, TQ

medelec35
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: PIC EEPROM does not store data

Post by medelec35 »

Would you mind posting your Flowchart so someone can help to find the problem.
Martin

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

My FC program is not fully completed yet, once I get it refine and complete I will post it. Meantime you can try to make use of the FC example program "EEPROM example for 16F88" that posted in the Matrix web that I had tried . This example program exhibits the same problem that I had encounter, it seems that the EEPROM process is not working with the real PIC hardward,it only works in FC simulation.
Any help is very wellcome, TQ

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: PIC EEPROM does not store data

Post by Benj »

The EEPROM gets wiped automatically when you program using PPP. You can disable this if you need to.

Is your program performing both the write and the read of the EEPROM memory?

Have you tried another chip? Could be that the EEPROM has been damaged or overwritten too many times on your specific device.

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi Benj,
Yes, my program does carry out read & write to the EEPROM. I had tried with other chip like 16F88, 16F870 & 16F877A.
I had downloaded the matrix web page program --"EEPROM experiment with 16F88" that has the same outcome. ie. can't readout the EEPROM contents.
Your help is very much appreciated.

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi Benj
I attached below an simple EEPROM test example FC that demonstrate it works fine with FC simuluation but not in the PIC itself. I do not purchase the Flowkit yet, so I am not able to check the problem. Can the flowkit works with E-006-6 version board?
Attachments
EEPROM Example.fcf
(7 KiB) Downloaded 238 times

User avatar
Dan81
Valued Contributor
Valued Contributor
Posts: 268
Joined: Sun Jan 15, 2006 4:07 pm
Location: Albi France
Been thanked: 60 times
Contact:

Re: PIC EEPROM does not store data

Post by Dan81 »

Hello

It works fine on my Matrix board (HP488) and a 16F887.
And the data is stored.

Daniel
Attachments
EEPROM Example_LNW-887.fcf
(7.5 KiB) Downloaded 262 times

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi Daniel,
Thanks very much of your response. I did tried with your attachment download to PIC16F877A & 16F870 (I do not have PIC16F887), the programmer compiles with "floating point not loaded" error message and program fail. I had tried so many time but the error message persisted. I do not know what is wrong? My programmer E-006-6 is able to program other FC code without any problem.

User avatar
Dan81
Valued Contributor
Valued Contributor
Posts: 268
Joined: Sun Jan 15, 2006 4:07 pm
Location: Albi France
Been thanked: 60 times
Contact:

Re: PIC EEPROM does not store data

Post by Dan81 »

hello

The file is exactly yours , just the micro controler has been changed.

My compiler is BoostC.


Daniel

ncc1502
Posts: 48
Joined: Mon Apr 07, 2008 9:18 pm
Has thanked: 23 times
Been thanked: 8 times
Contact:

Re: PIC EEPROM does not store data

Post by ncc1502 »

Just a thougt.

You do not set the fuse that code protect the eeprom from writing/reading when programming?
Better safe then sorry

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi, ncc1502
Can you kindly tell me where to set the eeprom code protect fuse? In the Expert configure screen I had put a "off" in the "Data EE Read protect" col. during the PIC config. Is this the correct place to set the eeprom code protect fuse?
TQ

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: PIC EEPROM does not store data

Post by Benj »

Working great for me on a 16F877A.
the programmer compiles with "floating point not loaded" error message
Please could you copy the compiler output error messages and paste to the forum as the program is compiling correctly for me.
Attachments
EEPROM Example_LNW-877A.fcf
(7.5 KiB) Downloaded 206 times

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi Benj,
Please find attached" programmer compile error message".
It seems that both of you are able to store the data into the EEPROM, I wander what is going wrong at my end. Is it possible the programmer itself has problom? I am using windows XP with service pack 3 , my PC is having a Intel dua core processor E7400 with 2 G ram. No anti-virus is installed.
Attachments
errorMsg.JPG
(98.98 KiB) Downloaded 1477 times

User avatar
Dan81
Valued Contributor
Valued Contributor
Posts: 268
Joined: Sun Jan 15, 2006 4:07 pm
Location: Albi France
Been thanked: 60 times
Contact:

Re: PIC EEPROM does not store data

Post by Dan81 »

hello

May be try to rename your file : EEPROM.fcf (save as )

Daniel

Leong NyukWah
Posts: 17
Joined: Mon Aug 03, 2009 7:07 am
Contact:

Re: PIC EEPROM does not store data

Post by Leong NyukWah »

Hi Benj & Daniel,
I manage to compile the fcf file if I cut & paste into a new file. The problem of unable to store the EEPROM date once downloaded to the PIC. I attached herewith the screen print of a sucessful download that I had noticed a WARNING EEPROM(0)statement stating" this licence is not generating flow code for this component." Is this statement has something to do with the EEPROM(0) data.
Attachments
F16F877A_EEProm.JPG
(173.49 KiB) Downloaded 1474 times

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PIC EEPROM does not store data

Post by Steve »

Yes - the "student/home" version of Flowcode produces code for only the more common i/o components and does not for the eeprom.

Post Reply