PDA

View Full Version : Pickit2 + microcode



hemidenis
- 2nd April 2010, 03:42
Hi
You guys probably answer this a million times, but i just begun this PIC endeavor, i trying to run pickit2 with microcode studio. The software of the pickit2 works flawless and finds the pic ok, (so my pickit2 work) but no with the microcode.

I found an article on the internet to how make them work together and involve DOS and so on, way beyond my knowledge of computers, is any easy way to do it? Again I just bought the pickit2 and the picbasic pro compiler.

Heckler
- 2nd April 2010, 04:02
I use MicroCode Studio...
I just compile the program in MCS, then move over to the pickit2 window and do a "File", "Import Hex" and go to the directory where MCS put the .hex file and load it and "Write" to the PIC. Mine are under C:\Program Files\Mecanique\MCS.

Just open up MCS and Pickit2 and leave them open for the duration of your programming / editing session.

Once you locat the directory that MCS stores the .hex file, Pickit2 will find it the next time you compile. If you are testing the same program repeatedly you will find the .hex file you are working on, listed as a recent file, under the "File" drop down in the Pickit2 window. You can just double click on the existing link under the "File" menu and you are ready to "Write" to your PIC.

I have not bothered to figure out how to get MCS to automatically compile and burn.

Sometimes I will manually modify the PIC "fuses" in the Pickit2 window just before burning. I'm not that good at setting the "fuses" correctly in my program yet. (look below the "Help" drop down menu, in the Pickit2 window, and you will see a "Configuration" link which will allow you to change the "fuse" bits.

Hope this addresses your question
good luck
Dwight

Darrel Taylor
- 2nd April 2010, 04:08
... i trying to run pickit2 with microcode studio. The software of the pickit2 works flawless and finds the pic ok, (so my pickit2 work) but no with the microcode.
The PICkit software doesn't accept command line parameters.

But there's a command line interface for it.

This should help ...
http://www.picbasic.co.uk/forum/showpost.php?p=68386&postcount=23
<br>

mackrackit
- 2nd April 2010, 04:35
Just do what Heckler said but I will add another thing.
If you are working on a project and repeatedly compiling the same code, use the auto import hex button. Then when ever the PicKit2 software see a new hex with the same name it will automatically load it and program the part.

Simple...

Darrel Taylor
- 2nd April 2010, 05:01
I never liked that Auto Import option.

A lot of times I'll hit F9 just to see if it compiles, and what syntax errors I need to fix.
But that makes a new .HEX file and the Auto Import programmes it into the PIC, whether you were ready or not.

I prefer to have control over when the PIC gets programmed.
With the command line interface and MCS ...

Press F9 to Compile
Press F11 to Program
Press F10 to do both

Much better control.
<br>

mackrackit
- 2nd April 2010, 05:17
Good point.

When it gets down to working on a big project I do not use MCS at all. So I guess it depends on the project and user.

ScaleRobotics
- 2nd April 2010, 05:25
The PICkit software doesn't accept command line parameters.

But there's a command line interface for it.

This should help ...
http://www.picbasic.co.uk/forum/showpost.php?p=68386&postcount=23
<br>

Thanks Darrel, nice work!

Darrel Taylor
- 2nd April 2010, 07:57
No problem, and thanks.

I'm sorry you hadn't seen it already.
I guess we'll have to fix that problem. :)
<br>

hemidenis
- 3rd April 2010, 00:29
Thanks a lot guys, yes that was the way that i found on the Internet, the command-line was a bit different but was the same process.

this is what i got: when i compile the program a window appear showing: "searching for the programmer" the computer search for a bit and nothing happened, so time for me to forget this way to do it.

So I tried the exporting hex method suggested, i went to the PBP and found the "blink.hex" file after i erase the pic+blank check procedures (doing it form the pickit2 software) theses are the results.

-exported the file, the display shown: hex file successfully imported

-so i clicked on write: the display shown: programming successful

-then i click verify: verification of program memory failed at address 0x000000

So seem like something is obviously not right, sorry for all this dumb questions, and i appreciate your patience

mackrackit
- 3rd April 2010, 02:34
Do you have code protect checked?

http://www.picbasic.co.uk/forum/attachment.php?attachmentid=4049&stc=1&d=1267325270