PicKit2 = USB Cable not Connected error

Moderator: Benj

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

PicKit2 = USB Cable not Connected error

Post by RawMicro »

I'm trying to program a PIC16F690 and get the message box that says "USB Cable no Connected. Do you want to Continue". Ultimately, it compiles but doesn't program the device.

I have the Programmer options set to...Location = C:\Program Files\Flowcode\V5\Tools\PICkit2\pk2cmd.exe and the Parameters as -BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R

PicKit2 firmware is V2.32

The PicKit2 works perfectly with Flowcode V4 Pro and the PicKit2 GUI but Flowcode V5 won't see it. Help!

I'm considering upgrading to V5 but I need to resolve this first.

Thanks!
Rich

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by dazz »

To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by RawMicro »

Yep, saw that and used it to put my programmer settings the way the are above. Still no joy :(

Rich

edit: I wonder if this is something that was fixed in V5 Pro but not in the Free Edition? You would think that more people would be talking about it as I imagine that using a PicKit2 would be a popular programmer option.

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by DavidA »

Hi Rich,

I will look into this for you Monday morning.

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by RawMicro »

Thanks...maybe the compiler messages below will help. It appears to want to launch the PPPv3 tool rather than the PicKit2. Also, tried a PicKit3 and it does the same thing.



File name: C:\Documents and Settings\c13393\My Documents\Flowcode\Book\flowcode-v5-test.c
Title:
Description:
Generated by: Flowcode v5.1.0.0
Date: Monday, June 25, 2012 10:29:30
Licence: Free version
***FREE/DEMO VERSION***
NOT FOR COMMERCIAL USE
http://www.matrixmultimedia.com
Compilation is up-to-date
Linking is up-to-date
Launching the linker/assembler...
C:\Program Files\Flowcode\v5\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F690 -nogui "flowcode-v5-test.hex"
Sending program...

...................................................................................................Return code = 1
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.


FINISHED

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by DavidA »

Hi,

Could you go to the Help >> Compiler Options and tell me what you have entered in each box on every tab (compiler, linker/assembler, programmer).

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by RawMicro »

Ok, take a look at the attached file.

Rich
Attachments
flowcode-v5-settings.png
Flowcode Settings
(25.79 KiB) Downloaded 12494 times

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by DavidA »

To allow PICkit2 to work with Flowcode 5 click on Build >> Compiler options and navigate to the Programmer tab.

Set the Programmer location to:

Code: Select all

    C:\Program Files\Flowcode\V5\Tools\PICkit2\pk2cmd.exe
Set the Programmer parameters to:

Code: Select all

    -BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R
This configures the PICkit 2 to program the target devices using the project hex file. The PICkit will erase the device, fully program the device and then verify the data has been programmed correctly onto the device.

To allow PPP to provide configuration settings simply leave the Use external program to set config options setting ticked and leave the details as.

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by RawMicro »

hmmm....don't know why the settings changed. They were as you suggested yesterday and this morning. I was moving some things around trying to get it to work so I may have pasted those in there accidentally. At any rate, changed them back and still doesn't work. Sorry for the confusion.

Compiler message list.....
Building CASM file
Memory Usage Report
===================
RAM available:256 bytes, used:38 bytes (14.9%), free:218 bytes (85.1%),
Heap size:218 bytes, Heap max single alloc:94 bytes
ROM available:4096 words, used:119 words (3.0%), free:3977 words (97.0%)



success
Return code = 0
Launching the linker/assembler...
C:\Program Files\Flowcode\v5\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F690 -nogui "flowcode-v5-test.hex"
Sending program...

.................................................................................................................................................................................................Return code = 1
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.


FINISHED
Attachments
Screen Shot
Screen Shot
ScreenHunter_05 Jun. 25 13.05.jpg (93.94 KiB) Viewed 18438 times

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: PicKit2 = USB Cable not Connected error

Post by Benj »

Hello,

You seem to have the PPP settings where your linker settings should be.

Launching the linker/assembler...
C:\Program Files\Flowcode\v5\Tools\PPP\PPPv3.exe -cs 2 -chip PIC16F690 -nogui "flowcode-v5-test.hex"
Sending program...

This is not correct and will not work.

I recommend you use the restore defaults option in the compiler options to restore all the correct settings.

Then in the programmer tab of the compiler options change the top two text fields to the following.

C:\Program Files\Flowcode\V5\Tools\PICkit2\pk2cmd.exe

-BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R

Leave the bottom two fields as is to allow you to reconfigure the device configuration using PPP.

RawMicro
Posts: 6
Joined: Fri Jun 22, 2012 9:50 pm
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by RawMicro »

Excellent! I think I know what happened to me. I didn't realize that when you select Default while in the Compiler tab, it defaults ALL the tabs and removed the PICKit2 command line path. Also, looks like I prefer to have a -T at the end of the parameters so that it's not held in reset after programming.

Thanks!

One more question while I have your attention. I purchased Flowcode V4 while at Microchip's Master's conference. I don't plan on attending the conference this year so where do I buy it to get the upgrade price?

Rich

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: PicKit2 = USB Cable not Connected error

Post by Benj »

Hello Rich,

You can buy direct from us or your local dealer and if you provide your v4 cd key when ordering then you will be given a discount on the v5 price. If purchasing from us then there is a text field on the flowcode sales page allowing you to enter any old license keys and it will then work out the upgrade price for you then and there.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by dazz »

Hi Rawmicro
not sure if your aware but when you set the parameters at the top in the option list box where it says <current> type in pickit2 and click the disc icon next to it and it will save those settings hth
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Get this error message when I try it on my new Windows 7 machine with V5.4 Pro. It has never yet worked to programme a chip.

Launching the programmer...
C:\Program Files (x86)\Flowcode\v5\Tools\PICkit2\PK2CMD.exe -BC:\Program Files\Flowcode\V5\Tools\PICkit2\ -PPIC18F14K22 -Ftest.hex -M -A5 -R
PK2DeviceFile.dat device file not found.
Return code = 24
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

But when I try it on a Windows Vista machine it works OK with apparently the exact same files and setup.

It won’t work with PICKIT3 either (I possess both types) saying:

Launching the programmer...
C:\Program Files (x86)\Flowcode\v5\Tools\PICkit3\PK3CMD.exe -P18F14K22 -F"test.hex" -E -M -Y"test.hex"
Return code = -1073741515
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections

The error messages are the same if I don't plug the PICKITs in.

I assume I do not have to install the PICKIT routines that are supplied with the PICKIT as your PK2CMD.exe does it instead.

Both PICKIT 2 and 3 do not work either when I try Project options/configure chip/autodetect: it says “USB cable is not connected.”

The offending laptop has USB 3.0 ports and 2.0 but both give the error. Could it be some incompatibility between Flowcode and the latest USB3.0 drivers or Windows 7?

With various disasters on failing laptops recently I have moved Flowcode around 4 machines recently. Two Dells with Vista and one old ASUS with XP were OK (only tried PICKIT2). It’s only the new ASUS with Windows 7 that has this problem.

I have tried a repair install just now in case there is some corruption with the install, although I have not noticed any other problem with other parts of Flowcode. Got the error message “Error 1316. A network error occurred while attempting to read from the file C:\Program Files (x86)\Common Files\Wise Installation Wizard\GLC5D2F.tmp” so had to abort the repair.

Then uninstalled and reinstalled. Made no difference.

As stated above my files are in the folder C:\Program Files (x86)\Flowcode. There is also a C:\Program Files\ folder but no Flowcode there. Could this be a problem?

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Any chance of an answer to above please? Way it’s looking at the moment I am going to have to swap my brand new laptop with my wife’s or I won’t be able to programme PICs.

Is this a similar problem to the Windows 7 one described here http://www.matrixmultimedia.com/mmforum ... f=2&t=8097
i.e. the USB drivers for the PICKIt are not installed? I can’t remember what happened when I first plugged the PICKIT in and whether it self installed any drivers. I did not point it to any special ones. Where do I look to find what it installed? Would using Microchip’s PICKIT installer help?

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: PicKit2 = USB Cable not Connected error

Post by Benj »

Hello,

Both the PICkit 2 and 3 use a HID driver which means there is no driver to install as such. The HID stack on the computer should simply 'allow' the device to work.

Saying this I have come across a Windows update previously for the HID stack that Microsoft insisted I install which flat out stopped my HID gaming mouse from working. Uninstalling the update allowed my mouse to work correctly again and I've never noticed any negative effects from not having the latest HID driver.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

So there is no solution?

Don't know anything about HID.

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by DavidA »

Hello echase,

Have you tried sending a hex file with the Microchip supplied environment for PICKit on the new PC?

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: PicKit2 = USB Cable not Connected error

Post by Benj »

You can download the Microchip stand alone PICKit 2 programmer software from here.
http://ww1.microchip.com/downloads/en/D ... up%20A.zip

If this works then the PK2CMD app used by Flowcode should also work.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Benj wrote:You can download the Microchip stand alone PICKit 2 programmer software from here.
http://ww1.microchip.com/downloads/en/D ... up%20A.zip

If this works then the PK2CMD app used by Flowcode should also work.
Unfortunately not the case. I installed the application from your link and it could read from and write to the chip. But no change when trying from Flowcode. Still a code 24 error.

At least I now have one method to write to the chip but not the best.

My laptop says it has a 64 bit OS but only under the hardware section, it does not say if it is Windows7 Premium 64bit under the software section.

Could the 64 bit be a problem because your readme file Readme For PK2CMD says “PICkit 2 Command Line Interface (PK2CMD) is a 32-bit command-line interface to the PICkit 2 device programmer” and says "64-bit Vista is not supported at this time” but does not mention Windows 7. As this file and PK2DeviceFile.dat are dated 2009 I suspect they are not fully compatible with Windows 7. Is there an update?

The equivalent readme file for PK3CMD is also 2009 but mentions nothing about versions of Windows. Judging from http://www.microchip.com/forums/tm.aspx ... e=1#605695 it is a USB3.0 compatibility problem and I can't find evidence that Microchip has solved it. But this may be irrelevant to the PICKit 2 problem seeing as that one does work via the PICKit 2 programmer software.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Is there any hope for a Flowcode/Microchip update to fix this? Otherwise looks like more and more people will get this problem as they turn to using more modern updates to Windows.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Are we still stuck on this one? Never managed to use my new PICkit3 and PICkit 2 won't work from within Flowcode.

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: PicKit2 = USB Cable not Connected error

Post by Benj »

Just had a quick look at the microchip website and the latest PK2CMD I can find is circa 2009.

I think the latest PK2CMD should work with the latest .dat file from the other pickit 2 resources but I'm not 100% on this.

What is the issue with the latest OS? could it be down to a simple path problem?

Would be interested to see what Microchip has to say on the issue.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: PicKit2 = USB Cable not Connected error

Post by echase »

Not a path problem. I think the Microchip files are just not compatible with Windows 7 and/or 64 bit OSes.

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: PicKit2 = USB Cable not Connected error

Post by Benj »

Hello,
Never managed to use my new PICkit3
My PICkit 3 is working well on a Win 7 64-bit machine. Might be worth having another go with it?

Here are the PICkit 3 instructions for Flowcode.
http://www.matrixmultimedia.com/support ... f=68&t=786

If you use the PICkit 3 with MPLAB or the stand alone programming software then it puts the PICkit 3 into a special mode which then cannot be used with the command line tool. There is a way to revert the PICkit back to allow the command mode to work if this has happened to you. I think the tell tale error message was "unrecognized response" or something along those lines.

Post Reply