PICKIT 3 with MIkroC PRO

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
Dominic.J
Posts: 37
Joined: 19 Jul 2008 03:37

PICKIT 3 with MIkroC PRO

#1 Post by Dominic.J » 06 Oct 2009 03:24

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

drdoug
Posts: 1074
Joined: 16 Aug 2007 03:49
Location: St. Louis, MO

#2 Post by drdoug » 06 Oct 2009 03:44

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.

Dominic.J
Posts: 37
Joined: 19 Jul 2008 03:37

#3 Post by Dominic.J » 06 Oct 2009 14:37

Hello drdoug,

thanks for your time.

I tried using the tool option which did not work.

MikroElektronika team pl., suggest.

Dominic.J

User avatar
nikola.kostic
mikroElektronika team
Posts: 433
Joined: 11 Aug 2009 12:12

#4 Post by nikola.kostic » 07 Oct 2009 14:29

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.

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

#5 Post by Mince-n-Tatties » 10 Oct 2009 17:29

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.
Last edited by Mince-n-Tatties on 21 Feb 2010 12:18, edited 1 time in total.

Fakstory
Posts: 1
Joined: 18 Nov 2009 10:38

#6 Post by Fakstory » 18 Nov 2009 10:39

HI Mince-n-Tatties

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

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

#7 Post by Mince-n-Tatties » 18 Nov 2009 20:06

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.

xainnasir
Posts: 1
Joined: 05 Mar 2013 03:20
Location: Pakistan
Contact:

Re: PICKIT 3 with MIkroC PRO

#8 Post by xainnasir » 05 Mar 2013 03:22

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...
You should also check The Engineering Projects because they have posted a lot of Arduino Projects and PIC Mirocontroller Projects and have also designed many new Proteus Tutorials and Engineering Projects. I hope you guys are gonna like them.

ira
Posts: 22
Joined: 14 Feb 2013 20:04

Re: PICKIT 3 with MIkroC PRO

#9 Post by ira » 24 Mar 2013 22:44

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

Javad123
Posts: 3
Joined: 09 Jun 2013 18:58

Re: PICKIT 3 with MIkroC PRO

#10 Post by Javad123 » 09 Jun 2013 19:32

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?

saschech
Posts: 298
Joined: 04 Sep 2012 07:13
Location: Schechingen Germany

Re: PICKIT 3 with MIkroC PRO

#11 Post by saschech » 10 Jun 2013 09:05

Hello

18F25K80 >> no pikcit2 no Support...

Regards Wolfgang
Attachments
Pickit2.png
Pickit2.png (37.59 KiB) Viewed 30645 times

demanik
Posts: 1
Joined: 27 Oct 2014 19:41

Re: PICKIT 3 with MIkroC PRO

#12 Post by demanik » 28 Oct 2014 10:32

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.
Attachments
PK3CMD.rar
(115.16 KiB) Downloaded 1287 times

AllenM
Posts: 75
Joined: 20 Mar 2013 17:30
Location: Rome, NY, USA

Re: PICKIT 3 with MIkroC PRO

#13 Post by AllenM » 05 Nov 2014 04:13


Post Reply

Return to “mikroC PRO for PIC General”