Page 1 of 1

FC6 with PIC18F2420 EE-Prom Problem

Posted: Sun Mar 16, 2014 11:31 pm
by Dirk Bubley
Hello together,


Í have a Problem with write and read to the EE-Prom at a PIC18F2420.
This function is not possible anymore with the amount of code, I have a feeling.
The Errors is a bit strange. If I try a EE-Prom W/R with less code then in the compiler summary below, it works.

If I write and read from my PICKIT-2, I can adress the EE_Prom too.

I have the Feeling that the Problem could be related to the read an write cycle that the EE_prom needs.

Could there be some disturbance to the write/read cycle??
Are there any restrictions??
Has anybody made some similar expierence?

Compiler Summary:
RAM available:768 bytes, used:222 bytes (29.0%), free:546 bytes (71.0%),

Heap size:546 bytes, Heap max single alloc:127 Bytes

ROM available:16384 bytes, used:12004 bytes (73.3%), free:4380 bytes (26.7%)

MY FC6 is Version 6.0.1.0

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Sun Mar 16, 2014 11:43 pm
by kersing
Hi Dirk,

Please use "Check for Updates..." from the "Help" menu to update to 6.0.4.0, then test again.

Jac

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 12:21 am
by Dirk Bubley
Many thanks Jac for the fast late reply.

Update patch done to 6.0.4.0.

Unfortunatly no Change of the Problem.

Is there a difference in resetting the Pic18F2420?

If a do a EE-Prom read with the follwing reset of the device, then my EE-prom value at the beginning of the Programm is read perfectly

If I do a regular OFF/ON reset the device does not read the EE-Prom.

Strange....

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 12:30 am
by kersing
Which eeprom location are you using? According to forum messages it's better to avoid using the first byte (0).

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 12:50 am
by Dirk Bubley
Hi,

I tried adress number 0,1 and 255. Same results, same Problem.

Maybe something in the middle could be a try.

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 12:59 am
by Dirk Bubley
...just checked EEProm adress 100!

Same Problem!

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 1:21 am
by kersing
One thing to try is to add a small delay (100ms to 1 s) to the start of your code. If that does not work, could you post a simple test flowchart we can take a look at?

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 10:02 am
by Dirk Bubley
...delay before and after is also not solving the problem.

I observed the following with no change in my code and the same chip:

If I do a EE-Prom read only of the chip from my Pickit-2. The reading after this reset of the EE-Prom cell in the programm is then done correctly.

If I do a power OFF/ON of the chip, the reading of the EE-Prom cell is not done, it looks that EE-Prom function and reading is skipped or ignored.
This looks to me like a EE-Prom initilized problem.

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 11:03 am
by Benj
Hello Dirk,

I found a problem with the EEPROM on some 18F devices last week.

Here is an updated chip definition file for the 18F2420 with the problem resolved.

Place the attached file into your "Flowcode 6/FCD/PIC" folder before starting Flowcode to load in the changes.
18F2420.fcdx
(25.89 KiB) Downloaded 241 times
Let me know how you get on.

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Mon Mar 17, 2014 5:57 pm
by Dirk Bubley
Hello Ben,

many thanks for your fast support. That new file solved the Problem!! :D

Great!!

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Fri Dec 07, 2018 2:51 pm
by Dirk Bubley
Hi Ben,

hope you are well.

I must recall this old Topic again because I tested today a new PIC with EE-Prom

It is a PIC18F2520. I observed the same Problem that I can`t read an write to the EE-Prom.

Maybe there is also updated PIC18F2520 Definition file needed too.

I would apreachiate if you could take a look at this issue.

BR

Dirk

Re: FC6 with PIC18F2420 EE-Prom Problem

Posted: Fri Dec 07, 2018 3:33 pm
by Dirk Bubley
Hello together,

problem solved. Somtimes the Problem is sitting in front of the PC!! :wink:

The mistake was that the EE-Prom Write function was not reached by the Programm.

BR
Dirk