Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pickit 2 Question

Status
Not open for further replies.

VRL_15

New Member
I want to use a program already stored in the Pickit 2 device.

How can I read the code or the hex file corresponding to that program back from Pickit 2?

Please let me know if anyone has an idea.

Thanks and Best Regards
 
If I understand your question correctly.
The program stored in the Pickit2 needs to be programmed to Pic first, then read back.
Either that, or I've got the wrong end of the stick.
 
That's only possible if the code protect bits have NOT been set (except for the highly technical, well funded and those with neat tricks/tools). If the code protect bits have been set you, as a hobbyist, are out of luck as they say. If this is a chip you purchased or found in some product you can assume they're set. Go ahead and try anyway but don't get your hopes up.

If the chip is one you programmed or it happens to be unprotected connect the PicKit2 as you would for programming and use the PicKit software to read from the device instead, it's that easy.
 
I want to use a program already stored in the Pickit 2 device.

are you talking about pickit2 on the go option? You stored the HEX in the pickit2 so you can program it to target mcu's without having computer present and now you want to take the hex out of pickit2 because you are on remote location without your original computer and with pickit2 only (for example) ?

There is no official way to read the i2c eeprom on the pickit2 to fetch the stored hex, it is not too complex to open the pickit2 and read the eeproms using another pickit2 or buspirate or similar tool. It should also be possible to write script for pickit2 to retrieve this stored hex using pk2 script (not simple actually). But officially - the only way to read the hex that is stored in programmer-to-go would be to write it to pic and then read it back using pickit2 (if the hex is not protected, if it is then mika is your only option of reading protected hex).

now, in any way - you can only read hex, you cannot read "code" as source code is not stored in the pickit2.

On the other hand, if you are not talking about programmer-to-go, and you want to look at source that runs on the pickit2 (pickit2 firmware), you can download source from microchip, it is open sourced: Online Registration Redirect you will find source and hex for download there
 
Arhi I think the OP wants to read the memory content of a device connected to the pickit2. Could be wrong but it is a far more common question.

If he wants to read the contents of the pickit2 internal memory used for on-the-go programming I would question his motive.

Having said that one should be able to connect the pickit2 to a PIC of the correct type and flash it. Then use MPLAB to the pickit2 software to read the memory of the PIC.
 
I decided to understand his question "as written" :D ... he also got the info about what if he want to read the firmware...

if he want to read the content of a micro-controller using pickit2 as a tool, I assume he started the pk2 gui and seen a "read" button :) ... as of protected pic's I mentioned mikatech :D they can read any pic for a price :) (not that I support that)
 
It is High time that the OP VRL_15 has to clarify what actually he wanted. when the Op is not showing up interest in an ambiguous query, perhaps no point in dealing it.

Hi, VRL_15, hope this message reaches you !!!!
 
Last edited:
The program is already there inside the pickit 2.

But I am not able to transfer the program to the device(PIC 12f629) by the push button on pickit 2.

If I try to use the Pickit 2 software, the pickit 2 will no longer be in the Programmer to go mode and I will lose the actual program.

Is there any way I can extract the hex code or any other file from Pickit 2 without using Pickit 2 software.

Thank you
 
when you push hex from program2go the hex stay in pickit2, you can use pickit2 to program many pic's using same program inside pickit2 ...

if you are not able to store the program in the 12F629 - have you checked if the 12F629 is properly powered? Pickit2 cannot provide power if it is not connected to power source, your pic need to be self powered. also have you checked all the lines?
 
Perhaps the op forgot that the hex file could well be available elsewhere. As I understand , the hex file is inside the pickit2 under "TO GO " mode. and he wants to make use of it.
If by any chance he doesn't have a copy, can we find a way to save as it helps the O P?
 
can we find a way to save as it helps the O P?

The PK2 don't offer way to pull out the hex from the "to-go" storage.
1. you can flash the hex to pic and then read it (if hex is not protected) - but OP mentioned that he cannot program pic from "to-go" so this probably mean that hex is long gone so nothing anyone can do
2. you can open the pk2 and use other pk2 or bus pirate or any other i2c reader and read content of the i2c eeprom directly. The "to-go" storage are just 2 i2c eeproms that you can read just like any other.
 
guys my question is whether i can read the hex code/ program stored inside the pickit 2

if i attempt to use mplab or pickit2 software pickit 2 will no longer be in the programmer to go mode and there is possibility of losing the original hex code inside the pickit 2.

the major obstacle for me is that the push button does not work nor the target LED blinks when I connect the pickit 2 to USB as I have the target to be powered from pickit 2.
 
guys my question is whether i can read the hex code/ program stored inside the pickit 2
This has been answered at least once in this thread. You can only read it directly by taking the pickit2 apart and then removing and reading the I2C eeprom.

if i attempt to use mplab or pickit2 software pickit 2 will no longer be in the programmer to go mode and there is possibility of losing the original hex code inside the pickit 2.

the major obstacle for me is that the push button does not work nor the target LED blinks when I connect the pickit 2 to USB as I have the target to be powered from pickit 2.

If my mem is right you put the program to go HEX into the PICkit2EEPROM from the GUI. So I do not expect regular programming or reading PICs to change the EEPROM content.

Could it be your PICkit2 is dead ?
 
VRL_15, have you read the guide for the Programmer-To-Go feature? It explains the whole process.

Guide: **broken link removed**
 
Status
Not open for further replies.

Latest threads

Back
Top