Installing MPLAB for Pickit 3.

2,611 views
Skip to first unread message

Hugh

unread,
Nov 26, 2011, 8:40:05 AM11/26/11
to uavdevboard
Hi Guy's,

Apologies, but I am making heavy weather of this.

Using the instructions that come with the Pickit 3, I installed the
software and plugged the USB cable connected to the Pickit 3 into my
Windows XP laptop.

All looked fine with a note on the taskbar that windows was installing
the drivers.

I then read that I need to install the ICD 2 drivers and open up the
driver installation file for ICD 2 that immediately informs me that I
have done the wrong thing by connecting the USB and allowing windows
to install the drivers.

I tried to uninstall things and then used the windows return to an
earlier date which caused a number of other programs to have
difficulty.

I have now re-installed MPLAB IDE, on my first install, I updated from
version 8.6 to version 8.8, although I have not updated to version 8.8
this time and can see from Windows Device Manager that MPLAB is not
installed.

The ICD 2 instructions then advised that I use the MPLAB USB driver
Pre-Install programme.

When I run the Pre-Install programme I get the error message telling
me

Pre-Install of:
Loader \ICD2W2KL.INF
Failed
System Error: 6 (0x00000006)
"The handle is invalid."
Note:
This result may indicate that:
a) The device is already installed.

Pre-Install of:
Client \ICD2W2K.INF
Failed

If I click on update the drivers, I get the following

Update of:
Loader \ICD2W2KL.INF
Failed
System Error: 6 (0x00000006)
"The handle is invalid."
Note:
This result may indicate that:
a) The device is not plugged in or
b) If the client driver loaded without
an error, then the Fail on the loader
driver can be ignored or
c) The device is already installed.

I am unsure of how to proceed since it appears that I have the wrong
drivers still installed, but Windows Device Manager tells me that
MPLAB is not installed.

If I plug the USB in, I am guessing that Windows will again try and
install any drivers that I previously removed.

I am totally frustrated with this since there is nothing in the glossy
instructions to advise you anything about this pitfall.

Would appreciate some thoughts on how to proceed if any one has some
ideas?

Thanks

Hugh

William Premerlani

unread,
Nov 26, 2011, 5:38:26 PM11/26/11
to uavde...@googlegroups.com
Hugh,
I think the most likely explanation is that the MPLAB menus are confusing you. Since you are not using an ICD2 programmer, you should not have to install anything related to ICD2. I think there is a good chance that your PICkit3 is working. Please try the following, and let me know what happens:

1. Make sure your PICkit3 is not connected.
2. Start up MPLAB. Do not open any project.
3. From the configure->selectDevice menu, select the dsPIC33FJ256GP710A as the device.
4. Plug your PICkit3 into one of the USB ports of your computer. Do not connect your UDB to the PICkit. Tell us what happens. (Either nothing interesting will happen, or your computer might complain about drivers, or it might say that the PICkit3 is being installed.) After the dust settles, proceed to the next step.
5. From the programmer->selectProgammer menu, select the PICkit3. Make sure it is the PICkit3 you are selecting, not the ICD2.

If everything is normal, you will get the following messages:

PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.26.81
Firmware type......................dsPIC33F/24F/24H
PICkit 3 Connected.
PK3Err0045: You must connect to a target device to use PICkit
 3.

In any case, tell us what messages you get. If you get the above, then you are in the clear. Next step is to connect your UDB4 to the PICkit3. Do not power the UDB4. From the programmer menu, select the reconnect operation. You should get the same error message.

Finally, from the programmer settings menu, under the power tab, select the option to supply power from the PICkit. You should then get something like the following message, if everything is ok:

Device ID Revision = 00003003

So, all of the above is not the usual power up sequence, it is just a useful way to figure out what might be going on.

Once we get your PICkit3 working, the sequence would be:

1. Open MPLAB
2. Open either MatrixPilotUDB4 project, or the roll-pitch-yaw project, depending on what you want to do.
3. Build the project.
4. Connect your UDB4 to PICkit, with or without power to the UDB4.
5. Select the PICkit3 from the programmer menu.
6. If you are not supplying power to the UDB4, then go to the programmer settings power tab and supply power from the PICkit3.
7. Program the UDB4.

Best regards,
Bill

William Premerlani

unread,
Nov 26, 2011, 5:42:07 PM11/26/11
to uavde...@googlegroups.com
Hugh,
One thing that I forgot to mention in my previous reply....
The first time MPLAB connects to your PICkit3, it will probably ask if you want to update the operating system in the PICkit3. Go ahead and do that. After that, you will not have to download the operating system to the PICkit3, unless you try to program a PIC other than the one on the UDB4, or unless you update to a newer version of MPLAB.
Best regards,
Bill

On Sat, Nov 26, 2011 at 8:40 AM, Hugh <hu...@sol.co.uk> wrote:

Tomasz Czarnecki

unread,
Nov 27, 2011, 4:38:29 PM11/27/11
to uavdevboard
hello
very cool video how to run pickt3 Instruction
for beginners 8 episodes
http://www.youtube.com/watch?v=HfGIpCnpDSM&feature=related

Hugh

unread,
Dec 11, 2011, 9:34:12 AM12/11/11
to uavdevboard
Bill,

Thanks so much for the clear instructions.

Not sure where I read that I needed ICD2.

Per your instructions, here is what I did and what happened:-

1. Make sure your PICkit3 is not connected.

2. Start up MPLAB. Do not open any project.

3. From the configure->select Device menu, select the
dsPIC33FJ256GP710A as
the device.

4. Plug your PICkit3 into one of the USB ports of your computer.

Do not connect your UDB to the PICkit 3.

Bottom right hand of screen the following messages appeared.

Found new hardware.

Your hardware is installed and ready for use.

5. From the programmer->select Programmer menu, select the PICkit3.

Make sure it is the PICkit3 you are selecting, not the ICD2.

For the UDB4 I selected :- dsPIC33FJ256GP710A

The MPLAB window then scrolled the following message:-

PICkit 3 detected Connecting to PICkit 3... Running self test... Self

test completed RS Version.......... 01.08.22 AP Version..........
01.08.12

An update is available …. I clicked yes

Then the following message appeared:-

Downloading bootloader... Bootloader download complete Running self
test... Self test completed Downloading RS... RS download complete
Downloading AP... AP download complete Running self test... Self test


completed Firmware Suite Version...... 01.26.81 Firmware
type......................dsPIC33F/24F/24H PICkit 3 Connected.
PK3Err0045:

You must connect to a target device to use PICkit 3.

I noticed at this point the Power, active and status lights are all
lit on the Pickit 3

I then connected Pickit 3 to the UDB4 ………. Nothing happens.

From the MPLAB programmer menu, select the reconnect operation, you


get the same error message.

PICkit 3 detected Connecting to PICkit 3... Firmware Suite
Version...... 01.26.81 Firmware type......................dsPIC33F/24F/
24H PICkit 3 Connected. PK3Err0045: You must connect to a target


device to use PICkit 3.

From the programmer settings menu, under the power tab, select the
option to supply power from the PICkit 3

Ticked box to power at the default 3.250 volts.

Message reads :-

Device ID Revision = 00003003

The lights on the UDB4 are now flashing, going through the same pre-
test programme that it did when I first applied battery power.

Clicked box to un-power UDB4 and lights switch off.

Off to try and load Matrix Pilot now.

Very many thanks again.

Hugh

Reply all
Reply to author
Forward
0 new messages