-
Notifications
You must be signed in to change notification settings - Fork 23
Home
PICKitPlus is software that interfaces with the PICKit2 and PICkit3 device programmers.
PICKitPlus software enables you to easily program, read and verify your projects code when using microcontrollers and EEPROMs.
The PICKitPlus development team also design and manufacture hardware like LCD controllers and sensors that make IoT development easier.
PICKitPlus software aims to help you avoid the complexities of complex software by making things easy. Our software is the easiest way to work with microcontrollers and EEPROMs. PICKitPlus software leverages the investment made in the PICKit 2 and PICKit 3 programmers to reduce the learning curve and the development time, and our hardware solutions are kits that are easy to build then you can integrate the solutions into your projects.
The PICKitPlus development team are UK based team. We design, develop and support our solutions from the UK. We operate UK business hours, but, to fulfill the needs of the global customers we are often available out of hours.
PICKitPlus portfolio of applications
Our software supports Windows XP to Windows 10, Linux and Raspberry Pi. To see the specifics of an application use this Help.
We support our portfolio applications and the associated parts database - we license per named user, the license includes one year of application support and we also provide free updates to the parts database as we add more parts.
Contacting the PICKitPlus development team
Email on pickitplus@anobium.co.uk, or,
You can call us on +44 (0)1483 610159 24 hours a day, if we are there, we will answer, else, leave us a message with your contact information and we can get back to you.
October 2020 Release
Changes in this release
Initial release of the web, xml, HTML, HTML5 and PDF Help for PICKitPlus
Reference |
---|
Time Stamp |
ASCIIDOCs rendered |
2020-10-16 |
Master ToC information |
2020-10-15 |
The PICKitPlus for Linux s called PKCMD-LX. The application is a commandline program.
PKCMD-LX can be used for reading and writing Microchip’s PIC range of microcontrollers, using the Pickit 2 or Pickit 3 device programmers.
PKCMD-LX provides the best experience for the Linux user, developers and the professional developer community.
PKCMD-LX uses a Linux AppImage for ease of installation and use. See supported Linux distributions
We provide one year software support/software maintenance from the date of purchase, this support/software maintenance can be extended each year.
The PICKitPlus for Linux commandline program is called PKCMD-LX.
The program can be used for reading and writing Microchip’s PIC range of microcontrollers, using the Pickit 2 or Pickit 3 device programmers.
Program Definition
PKCMD-LX is a 32-bit or 64-bit command-line interface to the PICkit 2 or PICkit 3 device programmer.
This interface is designed for programming devices in an evironment where batc/script files or custom controlling software is desired.
The PKCMD-LX executable requires the "PKPlusDeviceFile.dat" file for execution. This file should be kept in the same directory as the executable.
Note
|
To call the PKCMD-LX executable from other directories and still allow it to find the device file the device file may be explicitly specified on the command line using option -b (-B). |
This is targeted to users of the command-line interface. Refer to the "PICkit 2 User’s Guide" or "PICkit 3 User’s Guide" for more information about the specifics of the PICkit 2/3 device Programmer.
Device Support List
Device support is dependent on the device file version installed with the PKCMD-LX. See PICKitPlus web site for the latest list of devices supported.
When selecting a part using the "P" option, see PKCMD-LX Usage, you can use the full name or short name.
Note
|
-P 16f690 is the same as -P PIC16F690
|
Supported Linux Distributions
Distributions known to have a compatible version of libc include:
-
Arch 2011.08.19
-
CentOS 7.8.2003 (released in 2020)
-
Debian 7 (Wheezy)
-
Fedora 15 (Lovelock)
-
Gentoo 11.2
-
Mint 11 (Katya)
-
openSUSE 12.1
-
Slackware 13.37
-
Ubuntu 11.04 (Natty)
Distribution that do not use libc (such as Abyss, Alpine, Sabotage, Vanilla and Void) are not compatible.
Operating System Support List (Validated)
PKCMD-LX has been validated on 32-bit and 64-bit Debian-based Linuxes, but should work on all flavours, within specified limits, as follows:
-
Requires libc v2.13 or above. This is linked to the distribution, and is typicali out of your control. If your libc version is too low, often your only recourse is to install a newer distro.
-
Requires root (or sudo), at least until it is fully installed and configured.
-
Requires fuse (i.e. fusermount), if you want to run PKCMD-LX without root privileges.
-
Expects libfuse v2.9.0 or greater, although older versions may work. For example, v2.8.5 prints warning messages but does seem to function.
-
If you have a limited or evalulation license, you will need internet access to use the program.
Installation
Installation is very simple.
Ensure you download the RAR from the PICKitPlus distribution server.
Unpack the RAR file. Copy the AppImage for you PC architecture with the
DAT file to any folder. Execute the AppImage for parameters see PKCMD-LX
command line parameters, see PKCMD-LX Usage but, to
simple confirm operations, try -w -p<%yourpart%> -e
this will find PIC
and erase the PIC.
Note
|
Must be root. You can set up non-root access by running the program as root with the --configure-no-root <your-username> instruction. You will need to reboot afterwards following this command. |
AppImage
PKCMD-LX is distributed as an AppImage. Using an AppImage enables the development team to provide native binaries for Linux users just the same way we do for other operating systems. An AppImage enables the development team to package the PKCMD-LX application for common Linux based operating system, e.g., Ubuntu, Debian, openSUSE, RHEL, CentOS, Fedora etc.
The PICKitPlus AppImage comes with all dependencies that cannot be assumed to be part of each target system in a recent enough version and will run on most Linux distributions without further modifications.
An important advantage is that AppImage is designed from ground to run without super user permissions (you will need root permission to install). Almost all major distributions are compatible with AppImages, without requiring the user to make modifications to the base system. AppImages ship with their own runtime, and do not require external resources. You can simply use the AppImage on a USB disk and use it normally, on any machine.
To summurise: AppImages provide a easy and unified user experience that is simple to install and use.
Introduction
These are usage instructions. We assume a PICkit programmer and you are using the programmer as the power source.
In the examples below substitute %chipname% with the name of your target chip, and substitute %Filename% with the path and filename of your hex file.
To program all memory regions (except userids) and leave 5v on from the PICkit programmer:
-w -p%ChipModel% -f%FileName% -mpec -zv -a5
To program all memory regions at 3.3v and leave the power on afterward:
-w -p%ChipModel% -f%FileName% -mpec -zv -a3.3
To program all memory regions using an external power source:
-p%ChipModel% -f%FileName% -mpec
To program config and program memories whilst retaining eeprom contents, using external power:
-p%ChipModel% -f%FileName% -mpc
Commands
Command | Parameter | Explanation | Usage |
---|---|---|---|
-2 |
No parameter |
-2 Selects a PICKit 2 programmer only. The application can be forced to use a PICKit 2 programmer. This is useful when you have more than one programmer attached. |
Usage: |
-3 |
No parameter |
-3 Selects a PICKit 3 programmer only. The application can be forced to use a PICKit 3 programmer and ignore any PICKit 2 devices. This is useful when you have more than one programmer attached. |
Usage: |
--devicelist |
--devicelist List all supported devices. This is an exclusive command. Other command line parameters will be ignored. |
Usage: You may wish to pipe or redirect the output to a file. For example: --devicelist | more Will show the information in pages using the |
|
--devicelist-csv |
--devicelist-csv List all supported devices in CSV format. This is an exclusive command. Other command line parameters will be ignored. |
Usage: You may wish to pipe or redirect the output to a file. |
|
-a |
Requires a parameter |
-a Adjust the standard operating voltage. Can be used with programmers that support changing the operating voltage, such as official PICKit 2 and 3 tools. Not all clone PICKIT programmers support changing the operating voltages. Examples: -a5 -a3.3 -a2.8 If instructed to leave power on after programming (-zv), the voltage after programming will reflect this parameter. The -a parameter requires -w to operate. If -w is not specified then -a will not set the operating voltage. See also: -k to remove programmer power. |
Usage: Fixed Voltage Case |
-b |
Requires a filename as parameter |
-b The filename of the PKPlusDeviceFile.dat file. This an optional switch. The PKPlusDeviceFile.dat file is assumed to be in the same folder as the AppImage, unless otherwise specified. If present, --devicefile and --devicefile-csv will take this switch into account. |
Usage: |
-c |
No parameter |
-c Blank Check. Set the errorlevel to 0 if blank and nonzero (usually 16) otherwise.
|
Usage: |
-d |
-d Requires a parameter |
-d Delay on exit of the application. This switch will delay the exit of the application. This allows you time to review the output from the application (for example if you are running it from a script or IDE which will close the output window immediately afterward). You can specify a time delay or wait for a key press. For a time delay, use -dN, where N is an integer value. To wait for a keypress, use -dK. Some IDEs do not play well with -dK, because they don’t allow the user to interact with the spawned process using the keyboard. Using -dK with IDEs that do not support user input during programming may cause the IDE to lock up, waiting for a key press that can never arrive. Your mileage may vary. |
Usage: |
-e --erase |
No parameter required |
-e Erase device All memory regions and eeprom (if present) are reset to their default values as specified in the datasheet for that chip. This is a positional argument. Positional arguments are processed in the order they are given. If -e is placed AFTER -m, the device will first be programmed and then subsequently erased. The purpose of positional arguments is to permit multiple operations (erase, read, write) to be performed in a single invocation. |
|
-g |
Requires a parameter or parameter(s) string |
-g get (read, export) memory contents from device. Full options are: -gpecs memory regions are: p = Program memory e = EEPROM c = Configuration memory s = UserIDs 1) At least one memory region MUST be specified. If no memory region is specified as a parameter then the operation will fail. 2) If memory regions are specified then the specified regions are exported to the file specified with -f. For example, -gc will export the config memory region. 3) The export will be to the terminal (STDOUT) if -f is not specified. 4) -f is positional and must be specified BEFORE the -g or -m operation to which it refers. |
Usage: |
-h |
No parameter |
-h Show the basic Help. This switch shows a basic list of the supported arguments and their purposes. |
Usage: `-h ` Shows the list of the command line arguments. |
-i |
No parameter |
-i Display device ID and revision. Shows the Device ID and Revision in hexadecimal. |
Usage: |
-j |
No parameter |
-j Detect and summarise the attached PICKit programmers. Unit IDs of all connected PICKit programmers will be displayed. |
Usage: |
-k --killpower |
No parameter |
-k Remove power previously left on using -zv. -k is mutually exclusive to -w See also: -a. |
Usage: |
-m |
Requires a parameter or parameter(s) string |
-m Program device. Full options are: -mpecs memory regions are: p = Program memory e = EEPROM c = Configuration memory s = UserIDs The order in which these flags are specified is not important. 1) Memory regions MUST be specified. If no memory region is specified then the operation will fail. 2) Some chips have constraints on what memory types can be written by themselves. For example, some don’t support writing the config without also writing or erasing the program memory. For such chips, invalid programming attempts will fail with an error message. 3) If a memory region is specified then the memory region IS FIRST ERASED, then programmed. In other words, -e is implied for the memory region(s) specified. 4) All specified memory regions are automatically verified after programming. There is currently no way to disable this. To specify an output filename, use -f. This is a positional argument, and must appear BEFORE -m. If omitted, the data will be printed to the terminal instead. |
Usage: |
-n |
Requires a PICKit programmer name string as a parameter |
-n Program the device with the specified name. Use the PICkit programmer with the given Unit ID string (its so-called "serial"). Useful when multiple PICkit programmers units are connected. Not particularly useful when multiple programmers have the same ID. (Yes, this is a thing.) |
Usage: |
-p |
Requires a chip model name |
-p Program the device with the specified name. This argument is mandatory for all chip-related operations (i.e. read, write, erase). The switch specifies the target chip ("part") to be programmed. The device string needs to match the device being programmed, or the operation will fail. The device string is used to extract key information from the device database. An incorrect device string will not work and an error message will be issued. Specifying an incorrect part name may cause damage to your part. For example, specifying a PIC18F6520 when you have connected the low-voltage PIC18LF6520 will (unless -a is specified) apply 5 volts to the part, potentially damaging it. You may optionally omit the "PIC" prefix from your part name. For example, -p12F675 and -pPIC12F675 are both valid arguments. The part name is not case-sensitive. |
Usage:
Example 2. Program a 12F675. |
-r |
Requires a parameter |
Implemented as -rnnnn where nnnn is the size of the flash memory block to be protected, and where nnn can be any value within the constaints of NVRAM erase row size. Suggest multiples of 0x20. Currently the largest block HEF/SAF on any PIC is 0x100 (words) but This could possibly change in the future. So valid values would be 0x20, 0x60, 0x80 up to 0x100 |
Usage: Example 1: Example 2: |
-q |
Set the output to minimal (quiet) |
Usage: |
|
-s |
Requires a hexadecimal parameter |
-s sets the UserID value for microcontrollers that support UserID bytes/words. Supports hexadecimal values only. Supports usage of leading 0x and characters 0xhhhh to the specific length stated in the datasheet. There are two components to the command. The hexadecimal value and the command switch. 1) Hexadecimal value: -s is a positional value. Therefore, it has no effect until a write operation is performed. You must put -s hexadecimal value prior to the -m switch. 2) You must add the s parameter to the -m command. Example -mpecs |
Usage: |
-u |
Requires a hexadecimal parameter |
-u sets the OSCCAL value on devices with OSCCAL support. Supports hexadecimal values only. Supports usage of leading 0x and four characters 0xhhhh, or, a four character string hhhh. The hexadecimal value must start with 0x34; the next 6 bits determine the OSCCAL; and the lower two bits must be zero. Essentially, the 6 bits adjust the frequency up or down to achieve 4 MHz. -u is a positional command. Therefore, it has no effect until a write operation is performed. It must be specified before -m. Changing the OSCCAL value impacts the operating frequency of the device. YOU MUST ENSURE THE VALUE COMPLIES WITH THE SPECIFICATION AS STATED IN THE DATASHEET. Typical values are similar to 0x343C. NOTE: The PICKit+2 GUI can regenerate the OSCCAL value for you automatically. |
Usage:
Example 2. Set to hexadecimal value 0x3438 |
-w --applypower |
No parameter |
-w Power device from programmer, if safe to do so. Power will be applied during programming operations. If a specific voltage has not been specified with -a, the default voltage for the selected part will be used. Before applying power, the software will check if power is already present. If power is found to be present, the software will not attempt to supply more power. See also: -a, -k
NOTE: These command line switches operate differently from the original Microchip command line utility.
|
Usage: -w Power the device for programming.
|
-z --on-exit |
Requires one or more flags |
-z Keep power and/or MCLR asserted upon exit. -z Must be used with at least one of the flags V or M. The order of these flags is not important, and they are not case-sensitive. Specifies state on exit where v=power and m=mclr. See also: -a |
Usage: |
Application Errorlevels
Errorlevel | Exit meaning |
---|---|
0 | Success |
1 | "Incorrect Argument" |
2 | "Power Problem" |
3 | "Part Not Found" |
4 | "No Tool Found" |
5 | "Firmware Problem" |
6 | "Communication Problem" |
7 | "File Not Found" |
8 | "This Feature is Broken" |
9 | "This Feature is Not Implemented" |
10 | "Not Valid" |
11 | "Verification Failed" |
12 | "System Error" |
13 | "Bad Hex File" |
14 | "This Operation is Not Supported" |
15 | "This product is unlicensed" |
16 | "Blank Check Failed" |
17 | "An internal error has occurred" |
18 | "Requested operation is not possible" |
19 | "Product license could not be validated" |
20 | "A fatal error has occurred" |
Dump file
In the event of a crash, a dumpfile will be created at ~/.pkcmd.dump
,
and a message displayed to indicate the dumpfile has been created.
This can be used to diagnose issues and you may be requested to send the
dumpfile to the development team to assist in the root cause analysis of
the issue.
General Guidelines
When using this executable a parameter is either a standalone flag or a key/value pair.
For -m
and -g
there is no default. You must specify memory region.
-w
defaults to the standard operating voltage for the device, unless
-a
is also used to specify a voltage.
When a PICKit 3 device programmmer is first plugged in to USB the MCLR is asserted (pin is held low). A PICKit 2 device programmmer does not do this.
If you need to set or reset the BANDGAP on your device. Please use the PICKitPlus Windows Application for the PICKit 2 or PICKit 3. This can reset the BANDGAP with a click. Simply read the device, then select the 'BandGap:' in the upper part of the application interface - this will change the BandGap value. Select the desired BandGap by reselecting 'BandGap' and then Write or Erase the device.
And… quotes can be used around the argument; and it can optionally be separated from the switch by a space. This is a universal rule.
This is the maintenance section of the Help file. Please refer the sub-sections for details using the contents/folder view.
Introduction:
These insights are not distribution specific.
Solution Architecture: These components are key for a complete solution:
-
RAR file
-
AppImage
-
PKPlusDeviceFile.dat file
-
ini files
RAR file [Stuart add some words about the contents and that this is they should just unpack every time they get an update)
AppImage [Stuart add some words about selecting the correct image)
PKPlusDeviceFile.dat file [Stuart add some words about what to do if they want to update just this)
ini Files [Stuart add some words about the ini files … if any… )
Software Updates
We provide one year software support/software maintenance from the date of purchase, this support/software maintenance can be extended each year.
You will receive an email with information to update the software via your user specific download URL.
PKPLusDeviceFile Updates
We also provide updates to the PKPlusDeviceFile.dat file.
You will receive an email with information to update the software via your user specific download URL.
Last updated 2020-10-15 10:45:39 GMT Summer Time