UDB5/PICkit 3 Programming Problem

830 views
Skip to first unread message

David

unread,
Nov 28, 2015, 3:59:00 PM11/28/15
to uavdevboard

Hi All,

I’m using MPLab X IDE V3.10 with UDB5 board and PICkit 3 (a brand new, just purchased from Sparkfun). I connected PICkit 3 to UDB5 and made a build (which is done successfully) in IDE. After that, IDE tells me it couldn’t connect PICkit 3 to the hardware (UDB5). Refer to the error message below:



"C:\Program Files (x86)\Microchip\xc16\v1.25\bin"\\xc16-bin2hex dist/UDB-5/production/MatrixPilot-udb5.X.production.elf -a  -omf=elf 

make[2]: Leaving directory 'C:/MyProject/MatrixPilot-master/MatrixPilot/MatrixPilot-udb5.X'

make[1]: Leaving directory 'C:/MyProject/MatrixPilot-master/MatrixPilot/MatrixPilot-udb5.X'

 

BUILD SUCCESSFUL (total time: 58s)

Loading code from C:/MyProject/MatrixPilot-master/MatrixPilot/MatrixPilot-udb5.X/dist/UDB-5/production/MatrixPilot-udb5.X.production.hex...

Loading completed


Connecting to programmer...

The programmer could not be started: Could not connect to tool hardware: PICkit3PlatformTool, com.microchip.mplab.mdbcore.PICKit3Tool.PICkit3DbgToolManager


Connecting to MPLAB PICkit 3...

Connection Failed.


Here are additional info on what I did and on the setup

-        -  UDB5 has 6V power supply and is up and running (LEDs toggle properly after it’s powered on)

-        -  I have an ICSP cable (purchased from Sparkfun) which I used it to connect PICkit 3 and UBD5. And I checked the continuity of ICSP cable and tried to connect the different ways between PICkit 3 and UBD5.

-         - PICkit 3 is recognized by IDE (PICkit 3 Serial # is displayed in Project window, see attachment) and all 3 LEDs are on

 

Did anyone program UDB5 with PICkit 3 and MPLab X IDE V3.10 successfully ?

 

Thanks

 

David

UDB5 error messages.docx

William Premerlani

unread,
Nov 28, 2015, 4:45:33 PM11/28/15
to uavdevboard
Hi David,

I am not sure what is going on with your PICkit3 interface, I am hoping one of the other developers can help you with that.

However, I noticed that in your project options the device shows as a dsPIC33FJ256MC710. As far as I know, that is not correct for the UDB5, I am not sure how it got that way. For UDB5, the device should be dsPIC33FJ256GP710A. To change it, go into the
File->ProjectProperties tab and change the Device to dsPIC33FJ256GP710A.

But I am curious...is it possible that you accidentally changed the device? If not, I am hoping some of the other developers can shed some light.

Best regards,
BIll

--
--
---
You received this message because you are subscribed to the Google Groups "uavdevboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavdevboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Premerlani

unread,
Nov 28, 2015, 4:57:29 PM11/28/15
to uavdevboard
David,

For the fun of it, I tried connecting MPLABX to a UDB5 via my PICkit3 with the wrong device specified. Here are the messages I got as a result:


Connecting to MPLAB PICkit 3...
Firmware Suite Version.....01.28.18
Firmware type..............dsPIC33F/24F/24H

Target detected
Target Device ID (0x7ff0000) does not match expected Device ID (0xbf0000).

So, although your project has the wrong device selected, that does not explain why you were not able to connect to your PICkit3.

You have at least two issues to correct, wrong device type (easy to fix) and unable to connect (I am not sure why).

I am hoping some other developers will chime in.

Best regards,
Bill


On Sat, Nov 28, 2015 at 3:59 PM, David <texr...@gmail.com> wrote:

--

Peter Hollands

unread,
Nov 28, 2015, 5:15:37 PM11/28/15
to uavdevboard
I have version 3.15 of MPLAB-X (David is on version 3.10). In my readme notes for the 3.15 release it says the following:-

6        Known Problems

The following is a list of known problems. For information on common problems, error messages and limitations please see Troubleshooting in the online help file for the PICkit 3.

6.1       Software/Hardware Conflicts

Some applications, plug-ins or widgets may take control of, or interfere with, the system provided HID USB driver, which can cause problems communicating with the PICkit 3. If you cannot connect to the PICkit 3, review the Task Manager for these types of programs and close them.

If you have a PICkit 3 that is a revision 7 or above, you must use the MPLAB X IDE or MPLAB IPE (Integrated Programming Environment) to load the PTG (Programmer-to-Go) image onto the PICkit 3. Previous revisions (6 and older) of the PICkit 3 work with MPLAB v8.

For more information, see forum posts:

http://www.microchip.com/forums/m614572-p2.aspx

http://forums.ni.com/t5/Multifunction-DAQ/No-supported-devices-found/td-p/1856299/page/2


I have looked through the first of the two links above. I can see many people have had a similar problem, and there seem to be a number of solutions.
I recommend reading all the way through to the end of the thread.

Sorry I cannot help further as I am on the Mac with the Pickit 3.

David, I think it would be helpful for the uavdevboard group if you could confirm your Windows O/S version number as well.

Best wishes, Pete




Mark Whitehorn

unread,
Nov 28, 2015, 5:21:39 PM11/28/15
to uavdevboard
I haven't encountered this problem on Linux either.
--Mark

David

unread,
Nov 29, 2015, 12:03:53 AM11/29/15
to uavdevboard
Hi Bill, Pete,
I just changed  Device Type to dsPIC33FJ256MC710A (from dsPIC33FJ256MC710), and got the same error message. Actually, MatrixPilot project uses dsPIC33FJ256MC710A, since I got the error (in programming the device), I tried dsPIC33FJ256MC710.

Here are additional info for my setup:

-         - PICkit 3, Firmware suite Version ….. 0.1.32.09

-         - Window 7 (Enterprise), Service Pack 1


Best,

David

David

unread,
Nov 29, 2015, 12:09:10 AM11/29/15
to uavdevboard
Bill,
I attached a picture of my setup.

Best,

David

On Saturday, November 28, 2015 at 12:59:00 PM UTC-8, David wrote:
UDB5 Setup.JPG

Guy-François MESNIL

unread,
Nov 29, 2015, 4:02:50 AM11/29/15
to uavdevboard

Hi David,

For your information I have quite the same configuration than you :
Windows 7 (Familial edition) with service pack1
MPLAB X IDE  V2.00
Pickit 3
UDB5 connected to a 5V battery

In the MPLAB environment the device is dsPIC33FJ256GP710A Checksum 0x03BC
Debug tool PICKit3 : BUR134961380

Try to change your device type, as Bill recommanded,

Unconnected your telemetry cable, even if it is not concern by this issue, until you complete this task.

Best regards,
gfm

Peter Hollands

unread,
Nov 29, 2015, 4:18:39 AM11/29/15
to uavdevboard
David,

On my machine (Imac), I can disconnect the UAV Devboard development environment from the Pickit 3, and I will get the following correct error message when I program the UDB5....

Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.

In other words, the Pickit 3 is successfully communicating with my computer and saying correctly that it cannot see the dspic chip (because I have disconnected it). The test proves that MPLAB-X is connected via USB to the Pickit 3. In tracking down problems I am always an advocating of trying to halve the potential areas of errors. So In your case, I would encourage you to disconnect the programmer from the UDB5, but leave it connected to the USB link to your PC. You should try to program the board even though the UDB5 is disconnected and see if you can get the same message as above. 
  • If you get that message, with the UDB5 disconnected from the Pickit 3,  then something about your development board environment is upsetting the USB link of the Pickit and PC.
  • If you do not get that message, but still get the same error message as before (Connection Failed), then your uavdevboard environment is not where the problem is. The problem is then firmly going to be in your Windows PC, or your USB cable. You will then need to follow through on the routes to solutions found in this link (the one from the README file for MPLAB-X 3.15). The top issues and potential solutions in that post seem to be:-
    • Downgrading from USB3 to USB2
    • Booting into Safe mode
    • Removing potential offending windows background processes. e.g.:-
      • Fierce3500Config.exe (Wireless mouse)
      • accuweather.exe
    • Disabling devices. Even the Keyboard ! (Then the device connected !). Points to a conflict in Windows.
    • Using a separately powered Belkin USB hub
    • Running MPLAB-X in Administrator mode (I would not recommend that).
Best wishes, Pete

--

William Premerlani

unread,
Nov 29, 2015, 7:50:17 AM11/29/15
to uavdevboard
David,
MatrixPilot definitely should be using dsPIC33FJ256GP710A, not dsPIC33FJ256MC710A nor dsPIC33FJ256MC710.
So, you should be using dsPIC33FJ256GP710A. I note in your last email you are now using dsPIC33FJ256MC710A, which is still not the one you should be using, so even if you were able to get MPLABX to connect to your PICkit3, you would still get the error messages that I reported in one of my previous emails on this subject.
In any case, from your observations, it seems to me that the problem was not the device type. Rather, for some reason, MPLABX is not connecting to your PICkit3.
I suggest you re-read the notes from Peter Hollands. In one of them he suggested you read the information from Microchip about reasons for connection problems.
Best regards,
Bill

--

David

unread,
Nov 29, 2015, 1:26:22 PM11/29/15
to uavdevboard
Hi Pete, Bill and Guy,
Thanks for the suggestions.
I tried two things as you suggested:
====
1. Changed Device Type to dsPIC33FJ256GP710A (sorry, I didn't read the chip Spec. carefully). I also disconnected Serial Port. After that, I got the following error message:

Connecting to MPLAB PICkit 3...

 

Currently loaded firmware on PICkit 3

Firmware Suite Version.....01.39.15

Firmware type..............dsPIC33F/24F/24H

 

Target voltage detected

Target Device ID (0x0) does not match expected Device ID (0x7ff0000).


===
2. I tried to disconnect PICkit 3 from UDB5, and I got the following error message:

Connecting to MPLAB PICkit 3...

Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.39.15
Firmware type..............dsPIC33F/24F/24H

Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.

From these two messages, I feel somehow PICkit3 couldn't read CPU info. In the first message, it shows Target Device ID (0x0).

Best,

David

On Saturday, November 28, 2015 at 12:59:00 PM UTC-8, David wrote:

Tom Pittenger

unread,
Nov 29, 2015, 1:35:44 PM11/29/15
to uavdevboard

Target device Id of 0 means it did not communicate with the hardware.

--

William Premerlani

unread,
Nov 29, 2015, 1:39:39 PM11/29/15
to uavdevboard
David,

You have made some good progress. The following are two good signs:
1. MPLABX was finally able to connect to the PICkit3. That is progress.
2. When you had the UDB5 connected to PICkit3, PICkit3 detected voltage.

At this point most likely you have one or both of the following:

1. Broken wire in the cable between UDB5 and PICkit3, if you are using a cable.
2. Connector to the UDB5 programming port flipped.

I suggest you try connecting the PICkit3 to your UDB5 without a cable. It should be possible to connect the PICkit3 directly.

The arrow on PIKkit3 should line up with the "I" on the UDB5.

Best regards,
Bill




--

William Premerlani

unread,
Nov 29, 2015, 1:42:58 PM11/29/15
to uavdevboard
David,
Just to echo what Tom said, "Target device Id of 0 means it did not communicate with the hardware."
In other words, MPLABX was communicating with PICkit3, but PICkit3 was not communicating with UDB5.
I have run into that myself from time to time, when one of the following happens:

1. Broken cable wire.
2. Connection between PICkit3 to UDB5 swapped around or misaligned.

Best thing to do now is connect PICkit3 directly to UDB5 without a cable, make sure the arrow is aligned with the "I".

Best regards,
Bill

William Premerlani

unread,
Nov 29, 2015, 1:45:24 PM11/29/15
to uavdevboard
David,
One more thing to check. Take a look at the solder joints on the ICSP pins on the UDB5.
Best regards,
Bill

David

unread,
Nov 29, 2015, 8:03:17 PM11/29/15
to uavdevboard
Hi Bill, Pete, and all,
I got the problem resolved ! Thanks a lot for the help.

The leads on ICSP cable are too short to stick all the way into PICkit3. I used 6 individual wire jumper and got the following message:
*****************************************************

Connecting to MPLAB PICkit 3...

Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.39.15
Firmware type..............dsPIC33F/24F/24H

Target voltage detected
Target device dsPIC33FJ256GP710A found.
Device ID Revision = 3004

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x11fff
configuration memory

Device Erased...

Programming...
Programming/Verify complete
=============

Best Regards,

David

On Saturday, November 28, 2015 at 12:59:00 PM UTC-8, David wrote:

Peter Hollands

unread,
Nov 30, 2015, 2:52:31 AM11/30/15
to uavdevboard
David,

Super. 

Did you ever manage to work out what was stopping the Pickit 3 from being connected to the Windows PC in the first place ?
Or did it just start working ? Was it the Serial Connection (You disconnected that in your first test). ?

Best wishes, Pete


--
Reply all
Reply to author
Forward
0 new messages