Paramaters PICkit3.exe

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

I tried to use the PICKit 3. I do not know, but both MPLAB X IDE and MPLAB IPE programs did not work.

Then I tried the PICkit3.exe program to load a .hex file into a microchip.
http://ww1.microchip.com/downloads/en/D ... 0v3.10.zip
That worked correctly. Now I like to use this program in Flowcode 7.

But I need the paramters to use this programm in the compiler options.

Who can help?

With kind regards

Jan Lichtenbelt

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: Paramaters PICkit3.exe

Post by QMESAR »


User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Dear QMESAR

Thanks for hour help. I did know that site, but the program pickit3.exe has not been given, neither the paramters which I need.

Who else can help?

With kind regards

Jan Lichtenbelt

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: Paramaters PICkit3.exe

Post by QMESAR »

Hi
Ok may be I do not understand your problem however in this site is the parameter you need to execute the IPE and PICkit 3 from FC to program out of FC
works perfect for me :D
Secondly you can not Run the PICkit3.exe stand alone you need to use the standalone programming SW IPE which is part of the MPLABx installation for programming with Pickit 3 directly stand alone it is onlyt he old PICki2 that has a
standalone Programming Sw to execute the .exe
Attachments
4.JPG
4.JPG (51.84 KiB) Viewed 15757 times
3.JPG
3.JPG (35.7 KiB) Viewed 15757 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Dear QMESAR

I'm sorry to say, but the PICKIT3.EXE is the ONLY programm which works for me to download the hex file into a microchip. I tried also the MAPLAB programms without succes.
See details discussion on the MAPLAB forum http://www.microchip.com/forums/m964259.aspx.

Still remains my question what are the parameters for the pickit3.exe when used in connection with Flowcode 7?

With kind regards

Jan lichtenbelt

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Paramaters PICkit3.exe

Post by medelec35 »

Hi Jan,
To enable Flowcode 7 to directly program PICkit3 without going via MPLAP you need to:
1) Extract place attached file in \Flowcode 7\tools\PICkit3 folder, overwriting the original
2) Set up Compiler Options with the following option in the Programmer tab:
Location:

Code: Select all

$(appdir)tools\PICkit3\pk3cmd.exe
Parameters:

Code: Select all

-P$(chip) -F$(target).hex -E -M -Y -L
Enable writing of configuration to chip is not enabled so those Location & Parameters are left Blank.
PICkit3 settings.png
(35.18 KiB) Downloaded 9644 times
3)Make sure you have used PICkit 3 programming software to set PICkit 3 hardware to MBLAB mode
4) Make sure there are no spaces within the flowchart name.
If so remove spaces or replace wit hand underscore.
After that you should be able to program ok:

Code: Select all

Target folder: E:\FCTEST~1
Source name:   E:\FC Testing\pickit3_test.fcfx
Title:         
Description:   
Device:        PIC.16F.16F1937
Generated by:  Flowcode v7.1.1.0
Date:          Saturday, December 31, 2016 15:13:00
Users:         1
Registered to: Martin
Licence key:   BA48R5
http://www.flowcode.co.uk
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=16F1937 "pickit3_test.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.38
Build date: Jun 30 2016
Part Support Version: 1.38
Copyright (C) 2016 Microchip Technology Inc.
License type: Node Configuration

. . . . . .


Memory Summary:
    Program space        used    79h (   121) of  2000h words   (  1.5%)
    Data space           used    21h (    33) of   200h bytes   (  6.4%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Data stack space     used     0h (     0) of   1DCh bytes   (  0.0%)
    Configuration bits   used     2h (     2) of     2h words   (100.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)


You have compiled in FREE mode.
Using Omnicient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.


Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe  

Launching the programmer...
C:\Program Files (x86)\Flowcode 7\tools\PICkit3\pk3cmd.exe  -P16F1937 -Fpickit3_test.hex -E -M -Y -L

Connecting... 
PICkit 3 detected 
Connecting to PICkit 3... 

Firmware Suite Version...... 01.28.90 
Firmware type......................Enhanced Midrange 

PICkit 3 Connected. 
. . .


Target Detected 

Device ID Revision = 00000006 


Erasing ...
Erase device complete 
. . . . . . . . . . . . . . . .



Programming Device ...
Programming/Verify complete 
.



Verifying Device ...
Verify complete 


FINISHED
Martin
Attachments
PK3CMD.zip
(28.21 KiB) Downloaded 538 times
Martin

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Hi Martin,

Thanks a lot. I will try this as first project in 2017. I will keep you informed.

With kind regards

Jan Lichtenbelt

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Hi Martin,

I get an error message that the board has no power. But I do not use the EB006 board, but the PICkit3. And the microchip has been powered separately. What to do?
Clipboard01.jpg
Clipboard01.jpg (21.21 KiB) Viewed 15647 times
With kind regards

Jan Lichtenbelt

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Paramaters PICkit3.exe

Post by Steve »

Hello Jan,

It looks like Flowcode is still trying to use mLoader to send your HEX file to the chip.

Martin's previous post shows a screenshot of the Compiler Options screen. Does your screen in Flowcode look exactly like this?

Regards,
Steve.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Hello Steve,

I made a msitake. Now the correct programmer has been used. But now I get an error message:

De linker/assembler wordt gestart...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe

De programmer wordt gestart...
C:\Program Files (x86)\Flowcode 7\tools\PICkit3\pk3cmd.exe -P16F1847 -FTest_IOC_V2.hex -E -M -Y -L


Initialize Failed !!!

C:\Program Files (x86)\Flowcode 7\tools\PICkit3\pk3cmd.exe gerapporteerde foutcode (errorcode) 1


What is going wrong?

With kind regards

Jan Lichtenbelt

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Paramaters PICkit3.exe

Post by Benj »

Hi Jan,

Initialise Failed could be because your using a newer version of the PICkit firmware.

1) you can downgrade the pickit firmware following the details here. http://www.flowcode.co.uk/mmforums/viewt ... 457#p52318

2) You can use the new MPLABX IPE with the new firmware instead of the PKCMD application. Details here. http://www.flowcode.co.uk/wikiv7/index.p ... _.28NEW.29

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Hi Ben,

A lot of puzzeling. Here my experiences so far:
1) Hard to understand this procedure. An extra handicap is that http://www.microchip.com/stellent/idcpl ... e=en019469 is not availabel anymore.

2) This procedure is given on: http://www.flowcode.co.uk/wikiv7/index.p ... _.28NEW.29. But the problem was that I was not a little bit stupid, but very stupid. Looking at the picture at the top of this page, I filled all the paranmters in the compiler instead of the programmer.
Gen_Compiler_Options_Compiler_PIC.png
(26.6 KiB) Downloaded 9534 times
After a while, this was solved. But then I figured out that I have the MAPLABX IDE version 3.5 instead of v3.3. But version 3.5 does not have the ipecdm.exe file. I tried mplab_ide.exe (in the bin directory) but get the error massage that ....cluster file has not been found.

What to do?

With kind regards

Jan Lichtenbelt

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Paramaters PICkit3.exe

Post by Benj »

Hi Jan,.

Right I've just installed MPLABX 3.5 here.

When installing you need to make sure you have both MPLAB X IDE and MPLAB IPE programs ticked.
Both should be ticked by default at least they were for me.

The Flowcode Compiler Options - Programmer Tab are then as follows.

Location:

C:\Program Files (x86)\Microchip\MPLABX\v3.50\mplab_ipe\ipecmd.exe

Parameters:

Powered externally

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL

Powered via the PICkit at 3V3:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL /W3.3

Powered via the PICkit at 5V:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL /W5

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Hi Ben,

I have tried both internal and external powersupply. In both cases I get the message "Programmer not found" (errorcode=9).

With kind regards

Jan Lichtenbelt

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Paramaters PICkit3.exe

Post by Benj »

Hi Jan,

In that case I would recommend trying this.

Disconnect the PICkit 3 from your electronics.
Unplug the PICkit 3 from the USB.
Wait a few seconds
Reconnect the PICkit 3 to the USB.
Click Start -> All Programs -> Microchip -> MPLABX-IDE -> MPLAB IPE v3.50
This should launch the IPE software.
Next to Device select your target microcontroller from the drop down list.
Hopefully the PICkit will appear next to Tool.
Click Connect.
This should load the PICkit with the latest Firmware compatible with your device.
Connecting to MPLAB PICkit 3...

Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.42.18 *
Firmware type..............Enhanced Midrange

Now Downloading new Firmware for target device: PIC16F1764
Downloading bootloader
Bootloader download complete
Programming download...
Downloading RS...
RS download complete
Programming download...
Downloading AP...
AP download complete
Programming download...

Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.46.14
Firmware type..............Enhanced Midrange

Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.
You can now try connecting the micro and you can program the Flowcode hex file manually using the IPE. If you need to provide power then you can do so from the Advanced options under Settings. If the IPE is working then the Flowcode command line should also now be working.

If you're still having problems then might be worth contacting Microchip, they have replaced PICkit 3's for me in the past free of charge when they stop working.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Paramaters PICkit3.exe

Post by Jan Lichtenbelt »

Dear Ben,

Thanks s lot for helping, but even IPE does not see my PICkit3. Nothing in "tools", only the message tha IPE has been loaded.

I will contact Microchip for futher help/replacement.

With kind regards

Jan Lichtenbelt

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: Paramaters PICkit3.exe

Post by QMESAR »

Just keep in mind when you perhaps have the old MPLAB on your computer and then installed MPLABx then the drivers are allocated to MPLAB and then you have to use the Driver switcher to switch the drivers to MPLABx
in this case the IPE or MPLABx will not detect your PICKIT

just a thought

Post Reply