how to erase PIC

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times
Contact:

how to erase PIC

Post by achillis1 »

Hello,

I am dowloading a routine to my board and seems that the PIC cannot operate as intented. I believe that maybe flowcode cannot erase the PIC before it sends the routine.
Never the less at the end of the operation it says success but still I think that I should first erase the PIC.

So, how can I erase the PIC?


Thank you in advance,

Best Regards,
Andreas Achilleos

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

Re: how to erase PIC

Post by Steve »

Flowcode uses other programs to send programs to the PICmicro, for example PICkit2 or Matrix's PPP program. Both of these tools should automatically erase the chips before they are reprogrammed. Plus they can be run separately and have functions to read programs back and to erase the PICmicro.

User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times
Contact:

Re: how to erase PIC

Post by achillis1 »

Hello Steve,

As I can see now from PPP, yes it can erase it!
Can you tell me what is the ''send fuse data'' command?
Also in order to read back the program do I use the ''view PICmicro'' command? Will I be able to view the flow routine?


Thank you Steve.

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

Re: how to erase PIC

Post by Steve »

"Send fuse data" sends the configuration data that is set in the configuration screen.

"View PICmicro" reads back the contents of the chip and allows you to save it as a HEX file. Creating a Flowcode program from a HEX file like this is impossible. There are tools available that "disassemble" the HEX file data into Assembly code. But this will be difficult to read because none of the labels and variables in the code will have appropriate names.

User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times
Contact:

Re: how to erase PIC

Post by achillis1 »

Hello,

From PPP I can select "view picmicro" and can get the data from the PIC, if I select to "autodetect the PIC" then I get a message "PICmicro changed to xxxxxxx", so it means that the PIC is OK?
But when I send a routine to PIC from flowcode then it says: "PIC has not been erased continue?", then it continues with errors. On the other hand if I select from PP to erse PICmiro then it fails.
Do you have any idea?
Thank you,

Best Regards,

Andreas Achilleos
Attachments
error flowcode.txt
(4.01 KiB) Downloaded 319 times

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: how to erase PIC

Post by Spanish_dude »

Before flashing the PIC, you need to close all PPPv3 windows.

If it doesn't work using flowcode, have you tried sending the program using PPPv3 ?

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: how to erase PIC

Post by Benj »

Hello Andreas,

Check your config settings. Are you using any of the code protection settings?

If you are then the message is understandable. i.e. the program has gone in correctly but cannot be read back due to the code protection settings.

The msg.txt file you attached does not include the "has not been erased" message that would signify a bad or unsuccessful write that may suggest the device has been damaged or at least is not happy.

Post Reply