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
PICKIT 3 with MIkroC PRO
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.
I just import the hex file to MPLAB and program from there.
I would love to learn how to get the command line working.
- nikola.kostic
- mikroElektronika team
- Posts: 433
- Joined: 11 Aug 2009 12:12
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.
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.
-
- Posts: 2780
- Joined: 25 Dec 2008 15:22
- Location: Scotland
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.
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.
-
- Posts: 2780
- Joined: 25 Dec 2008 15:22
- Location: Scotland
Re: PICKIT 3 with MIkroC PRO
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.
Re: PICKIT 3 with MIkroC PRO
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
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
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?
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
Hello
18F25K80 >> no pikcit2 no Support...
Regards Wolfgang
18F25K80 >> no pikcit2 no Support...
Regards Wolfgang
- Attachments
-
- Pickit2.png (37.59 KiB) Viewed 30999 times
Re: PICKIT 3 with MIkroC PRO
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.
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 1292 times