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.

Reading a PIC's file

Status
Not open for further replies.

orbiter

New Member
Hi all,

Noob here to the pic micro. I'm still at the early learning stage but I have a question regarding my new Olimex USB programmer. When I bought the programmer I also bought two spare (blank) pic18f252 chips just in case I damaged the Olimex's onboard one.

The thing is that.. My two new 18f252 chips dont have a bootloader installed, and this bootloader I believe is required before I would be able to update the firmware on the chips?

The question is.. Can I in some way get the bootloader file from the original Olimex pic chip, copy it, and then transfer it over to my two spare chips so that they will also work on my new programmer?

I've asked Olimex but they just suggest I buy two more spare chips from them.

If this can be done how do I do it please guys? Please remember I'm new to pics, I do have MPLAB and a couple of programmers inc the PICKIT3, but as i say I'm still finding my feet.

Kind regards

orb
 
You can try to hook a programmer up to the Olimex's chip and read the code off it if it is not code protected. Then program that code back onto your new chips. You'll have to grab the entire thing, but that shouldn't cause any issues.

If it's code protected, you're out of luck.
 
Ok thanks for the reply my friend.

Just one thing.. As I'm a total noob and have am only just finding my way around MPLAB, could you please point me in the right direction in regards what I do in MPLAB once I've set the programmer and chosen my chip type etc. I Know about powering the chip from the PICKIT 3 etc but I'm a little short on knowledge beyond that, so I could do with some pointers please in how to go about MPLAB to carry out this procedure. Would it be possible firstly just to advise on what I do to check if the pic is actually read protected?

Many thanks for any help

regards

orb
 
Last edited:
Not sure how to do it in MPLAB. Find the Stand Alone programming software for the PicKit3 (it's in the Microchip forums someplace) and have it read the Olimex's chip. It will tell you if it is code protected or not. If it does read it, you can save it in Hex format on your hard drive.

Then hook the PicKit3 up to one of the new chips, load that same Hex file, and write it to the new chip. That will be the easiest way to handle it.
 
In MPLAB I think you choose the chip, then the programmer, connect and in the menu go "Programmer" then "Read". If you then go to "view" and "program memory" I think you'll be looking at the program on the chip.
 
In MPLAB I think you choose the chip, then the programmer, connect and in the menu go "Programmer" then "Read". If you then go to "view" and "program memory" I think you'll be looking at the program on the chip.

Thanks for that Norlin, it helped a lot. I only knew about how to actually choose the programmer & chip, but I wasn't sure on the next parts so thanks again.

I'm now looking at the code in the chip, however when I choose Opcode Hex/Machine or Symbolic I can't copy any of the code. Does this means the chip is read protected?

Regards

orb
 
If it were read protected, you wouldn't be able to see anything at all. When you have the program memory open, right click anywhere in that window then choose "output to file"
 
If it were read protected, you wouldn't be able to see anything at all. When you have the program memory open, right click anywhere in that window then choose "output to file"

Ok so that's good news? :)

Does it matter which button is selected at the bottom of the program screen.. Opcode Hex/Machine or Symbolic?

And if I can pick your brain a little more please.. What do I do once I've output the code to a file, Is it just a reverse procedure except with one of my spare chips in the Olimex programmer?

Thank you again for your help.

orb
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top