Page 1 of 1

PICKIT 3 with MIkroC PRO

Posted: 06 Oct 2009 03:24
by Dominic.J
Hello,

I have with me PICKIT3 programmer from Microchip and want to use it with MickroC pro.

I had gone through some threads regading this but does not work.

When I Build+Program in MikroC pro the PICKIT3 should popup and program instead of PICFlash.

pl., let me know the exact procedure

Thanks in advance.

Dominic

Posted: 06 Oct 2009 03:44
by drdoug
My understanding is there is a command line that you can put in mE that will trigger the PicKit3 to write but I could not find any info on it (only spent 30 seconds looking though).
I just import the hex file to MPLAB and program from there.

I would love to learn how to get the command line working.

Posted: 06 Oct 2009 14:37
by Dominic.J
Hello drdoug,

thanks for your time.

I tried using the tool option which did not work.

MikroElektronika team pl., suggest.

Dominic.J

Posted: 07 Oct 2009 14:29
by nikola.kostic
You can use PICKIT3 programmer, you just need to add it correctly as a tool in your mikroC PRO.

When creating new tool, give it a name, browse for and put PICKIT3 programmer file path in File Name menu.

Then you have to set up Parameters for that tool. In order to set up parameters, you should firstly see what command line format does PICKIT3 programmer expect and use that format for parameters.

Posted: 10 Oct 2009 17:29
by Mince-n-Tatties
i can tell you how to do it with pickit 2 (as thats what i use), which may or may not be of any use.

As for having pickit 2 activate with build+program, that does not work. all that happens is picflash opens and closes with whatever settings i use.

So first things to understand are...

1. Do you want to just have pickit2 flash your hex everytime it changes? if so then this is super easy. You just open pickit once (each session) and set the "auto import hex and write" to on, then in the programmer menu, tick the "write on PICkit button". This setup will then flash the hex file anytime it changes (you build it in mikroC).

2. If you want to be able to program the hex from within mikroC. For pickit 2 there is another software set from microchip (search microchip for >> pickit 2 commandline) this then becomes the commandline interfact that mikroC will invoke via tools menu which you will setup.

i use the following commandline (the bit that goes in the "Parameters box")

/P%CHIP_NAME /I /A5 /E /F%HEX_FILE_NAME /M /TVDD /BC:\PK2CMDv1-20

which basically checks the device connected is the same as the device assigned in the build, does an erase and full flash of ALL locations then ensures the VDD is left on after flashing.

to run the flashing tool, i just do a build, then i just click on the icon mikroC auto generates on the tool bar. command window opens and pickit does its stuff. works like a charm.

also while developing command line strings its worth adding /HK as this will keep the command window open so you can see any errors reported.

sorry i dont have a pickit 3 to be of exact help guys.

Posted: 18 Nov 2009 10:39
by Fakstory
HI Mince-n-Tatties

I tried what you say, but that doesn't work, what can I do?

Posted: 18 Nov 2009 20:06
by Mince-n-Tatties
are you using pickit2 or pickit3?

if you are using pickit 2 and it doesnt work for you then read the information supplied with the commandline tool.

if you are using pickit 3. I have no idea, as i dont have one to work with.

Re: PICKIT 3 with MIkroC PRO

Posted: 05 Mar 2013 03:22
by xainnasir
I really trapped in this problem but finally i found te solution here .... http://www.theengineeringprojects.com/2 ... ckit3.html .... hope it help you guys too they have explained everything in detail...

Re: PICKIT 3 with MIkroC PRO

Posted: 24 Mar 2013 22:44
by ira
I was struggling with this today and got it working. It seems that MikroC does not properly handle spaces in commands so I made a batch file and put it in c:\temp. I put all the parameters here except the file name which I put as the parameter in MikroC

Batch file:
c:
CD "\Devel\Switch\MicrochipCSP\MikroC>"
"\Program Files (x86)\Microchip\mplab ide\Programmer Utilities\ICD3\ICD3CMD.exe" -E -F%1 -M -P18F25K80
pause so I can see what happened, otherwise it's impossible to troubleshoot.

In Micro C Tool0 I put:

File Name: C:\temp\program.bat

Parameters: "%HEX_FILE_NAME"

If the %HEX_FILE_NAME name contains spaces you must put double quotes around it in the parameters or the batch file sees it as more than one parameter
When I try to put more parameters I needed to put them first and I tried using CHIP_NAME but it is PIC18F not the required 18F so I put it in the batch file

Ira

Re: PICKIT 3 with MIkroC PRO

Posted: 09 Jun 2013 19:32
by Javad123
You can use PICKIT3 programmer, you just need to add it correctly as a tool in your mikroC PRO.

When creating new tool, give it a name, browse for and put PICKIT3 programmer file path in File Name menu.

Then you have to set up Parameters for that tool. In order to set up parameters, you should firstly see what command line format does PICKIT3 programmer expect and use that format for parameters.



would you please explain more... How to add pickit2 to mikroC?

Re: PICKIT 3 with MIkroC PRO

Posted: 10 Jun 2013 09:05
by saschech
Hello

18F25K80 >> no pikcit2 no Support...

Regards Wolfgang

Re: PICKIT 3 with MIkroC PRO

Posted: 28 Oct 2014 10:32
by demanik
I wrote the program for connection of Pickit3 to mikrobasic, has to work and with mikroc.
To unpack contents of archive in a root of the disk "c".
To state in the tools -> options menu:
File Name: C:\PK3CMD\CMDPK3CMD.exe
Parameters: %CHIP_NAME "%HEX_FILE_NAME" /E /M
It is possible to add also other keys of programming.

Re: PICKIT 3 with MIkroC PRO

Posted: 05 Nov 2014 04:13
by AllenM