Difference between revisions of "PICKit 2"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
imported>Pew
(Replaced content with "Category:Pending deletion")
(Undo revision 2945 by [[Special:Contributions/imported>Pew|imported>Pew]] ([[User talk:imported>Pew|talk]]))
(Tag: Undo)
Line 1: Line 1:
[[Category:Pending deletion]]
+
The '''PICKit 2''' is a microprocessor programming and debugging peripheral. {{#if: {{{use|}}} | {{{use}}} | }} Below are instructions on how to get it working on Linux.
 +
 
 +
{{Template:Version|Ubuntu 10.04}}
 +
 
 +
==Group Account==
 +
You'll need to add a group for the device and add yourself to that group.
 +
<pre>
 +
$ sudo addgroup embedded
 +
$ sudo addgroup $USER embedded
 +
</pre>
 +
 
 +
==Udev Rules==
 +
Now you need to ask udev to give the recently created group permission to access the USB device.
 +
<pre>
 +
$ echo '#PICKit
 +
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0032", MODE="0660", GROUP="embedded"
 +
#PICKit2
 +
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0033", MODE="0660", GROUP="embedded"
 +
#PICKit3
 +
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="900a", MODE="0660", GROUP="embedded"
 +
#ICD2
 +
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="8000", MODE="0660", GROUP="embedded"
 +
#ICD21
 +
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="8001", MODE="0660", GROUP="embedded"' | sudo tee /etc/udev/rules.d/25-embedded.rules >/dev/null
 +
</pre>
 +
 
 +
==Apply the Rules==
 +
Use the following line and plug the PICKit in and out to make the rules apply.
 +
<pre>$ sudo service udev reload
 +
</pre>
 +
 
 +
==Compile pk2cmd==
 +
<pre>
 +
$ sudo apt-get install build-essential libusb-dev
 +
$ wget http://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz
 +
$ tar xf pk2cmdv1.20LinuxMacSource.tar.gz
 +
$ cd pk2cmdv1.20LinuxMacSource
 +
$ make linux
 +
</pre>
 +
 
 +
==See Also==
 +
* [[PIC]]
 +
* [[udev]]
 +
 
 +
==External Links==
 +
* [http://sync-signal.com/2010/01/getting-started-with-pickit2-on-ubuntu-9-10/ Getting Started with a PICKit 2 on Ubuntu 9.10]
 +
 
 +
[[Category:Hardware]]
 +
[[Category:Howtos]]

Revision as of 23:06, 3 January 2019

The PICKit 2 is a microprocessor programming and debugging peripheral. Below are instructions on how to get it working on Linux.

The following instructions were written for Ubuntu 10.04 and may not work on other platforms or versions. If you would like to see additional coverage, please add it yourself or make a request on the wiki's wanted page.

Group Account

You'll need to add a group for the device and add yourself to that group.

$ sudo addgroup embedded
$ sudo addgroup $USER embedded

Udev Rules

Now you need to ask udev to give the recently created group permission to access the USB device.

$ echo '#PICKit
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0032", MODE="0660", GROUP="embedded"
#PICKit2
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0033", MODE="0660", GROUP="embedded"
#PICKit3
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="900a", MODE="0660", GROUP="embedded"
#ICD2
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="8000", MODE="0660", GROUP="embedded" 
#ICD21
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="8001", MODE="0660", GROUP="embedded"' | sudo tee /etc/udev/rules.d/25-embedded.rules >/dev/null

Apply the Rules

Use the following line and plug the PICKit in and out to make the rules apply.

$ sudo service udev reload

Compile pk2cmd

$ sudo apt-get install build-essential libusb-dev
$ wget http://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz
$ tar xf pk2cmdv1.20LinuxMacSource.tar.gz
$ cd pk2cmdv1.20LinuxMacSource
$ make linux

See Also

External Links