Fc7 EEprom component not W/R in pic 18F67K22 help

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

Moderator: Benj

Post Reply
xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

Hello everyone, I am using the component to write to the internal EEPROM of the pic18f67k22 has a memory of 1024 bytes .... find attached copy of the list ... if I simulate in Flowcode everything is fine but when the load on the microprocessor do not write and do not I read nothing. Thank those who can help me.
Attachments
StringEE_my.fcfx
R/W double string in EEprom internal
(12.62 KiB) Downloaded 311 times

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Hello,

The program seems to write and then read back the EEPROM in a loop. Do you have another program which is printing out or comparing the values or is this program just to demo?

Either way do not load the program you posted onto a chip. EEPROM memory locations generally have a re-write count of between 10,000 and 1,000,000 times and so in the space of a few seconds you could easily be burning out the location by writing over and over again in a tight loop. If this has already happened then you can change to another location and this should continue to work again.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

Benj Hi, thanks for the reply ... the program you see is a loop to speed up video watching .... in microprocessor cho added a 20 second delay at the bottom with LEDs for confirmation writing etc. But I do not write and read anything if I use pickit3 and write or read directly from the function programmer everything! it's just the program that does not work! I have no idea what can be also changed microprocessor but nothing!

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Ok that makes sense, Investigating the code now to ensure it is correct for the specific device.

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Right we are now using the eeprom functions built into the XC8 compiler.

The original CAL file had some unneeded preprocessor decisions so I have stripped these out just in case these were causing issues.
PIC_CAL_EEPROM.c
(1.77 KiB) Downloaded 330 times
The file lives in the "Flowcode 7/CAL/PIC8" directory.

I'll check the XC8 files now to make sure they look ok. Might also be worth downloading the latest XC8 compiler and see if that makes any difference.

Details on how to do this available from here.
http://www.matrixtsl.com/mmforums/viewt ... 843#p75824

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

I tried to compilel in the attached program with FC6 and works :-)
if I compile with FC7 not work :-(
I do not want to work on FV7 .. we can solve?
thx
Attachments
StringEE_my.fcfx
ranning in V6 not raning in V7 :-o
(10.62 KiB) Downloaded 290 times

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Hello,

in v6 we had our own code to drive the EEPROM, in v7 with the new compiler we are using their in built library. I could try and bring back the old way of doing things in the new compiler and see if that makes any difference.

Two things you can try for now.

1) Try with the new v7 CAL file I attached above and see if that makes any difference.

2) Try the latest XC8 compiler release from Microchip. It's slightly newer than the one shipped with Flowcode and so there may be a EEPROM fix in there.

I'll have a quick go at getting the v6 code working in v7 so you can have a play with that.

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Right here is another CAL file you can try. This controls the registers for the EEPROM rather than using the XC8 library like v6 used to do.

The file needs to be placed into the "Flowcode 7/CAL/PIC8" folder.
PIC_CAL_EEPROM.c
(2.68 KiB) Downloaded 337 times
Let me know how you get on.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

I tried it with the file over pic_call_eeprom.c new ... but nothing changes!
I installed 1.38 XC8 version but but nothing changes!
only works with boostC in FC6 version ... but I do not know how to install it on Flowcode 7 ... I tried but by mistake do not know the parameters to be set in the compiler window ... I copied those of the version 6 directory, but changing nothing
if you know how I feel right away ... but you have to solve with CX8 of FV7
thank you Benj

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Hello,

Right I have found the problem now and hopefully this latest file will fix the issue for you. Tested it working on a 18F4455 device.
PIC_CAL_EEPROM.c
(2.65 KiB) Downloaded 349 times
The default PIC compiler options if you need to get them back to their default values are shown below.

Compiler Location
$(appdir)compilers\pic\bin\xc8.exe

Compiler Parameters
--chip=$(chip) "$(target).c" --MSGDISABLE=359,1273,1388

Linker Location
$(appdir)tools\DoNothing\DoNothing.exe

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

I try second file pic_cal_eeprom.c 2.74k but not running .... :-(

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

The closest thing I have to your chip is the 18F45K22 device and this also seems to not be running correctly with the latest CAL file.

I'll keep investigating and see if I can solve this last step.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by xelites »

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS :-) now running

but I have to keep the old file, or is no longer needed?

thx soooo much Benj

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Right it appears my chip was the problem. The 18F45K22 is not running at all but I also have a 18F44K22 and that is working perfectly with the last CAL file I posted.

45K22 device has now gone in the bin :)

Hmm not sure why your device would be different. Just going to check the datasheet of the two devices now and see how the match up.

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: Fc7 EEprom component not W/R in pic 18F67K22 help

Post by Benj »

Hurrah,

No you don't have to keep the old file. Thanks for letting me know.

I'll make sure the new working file goes into the next release.

Post Reply