picp -- PICSTART Plus Programmer Interface
Copy picp.tgz to the target directory then open and decompress the archive with:
Change to the picp directory:
Build the application:
picp requires as command line arguments a serial device, a PIC device, and one or
more flags. In general,
For the following discussions, the PICSTART Plus is assumed to be connected
PICSTART Plus VERSION:
To verify communications with the PICSTART Plus, enter the serial device it is attached to and
the name of any supported PIC device, plus -v to report the version number:
If all is well, the firmware version number of the PICSTART Plus will be returned. If the version number of the firmware in your PICSTART is too old, an error message will be returned, prompting you to contact Microchip to obtain the latest firmware for your PICSTART Plus. The PICSTART Plus firmware runs on a PIC17C44-25.
To blank check the device, enter:
This will check all regions which exist on the device and report whether each is blank or not.
Specific regions can be checked individually by adding their specifiers to the -b argument:
This example will only blank check the program space. More than one specifier may be added to a single argument:
In this case, the program space, the configuration bits, and the data space will be blank checked.
To read from the device's program space, enter:
The contents of the program space will be dumped to the terminal in Intel Hex format. Optionally, you may specify a file to write the results to:
The contents of the program space will be dumped in Intel Hex format to a file named
To read the device's ID locations, enter:
To read the device's configuration bits, enter:
To read the device's data memory space (if present), enter:
As with the program space, a file name to dump the output to may optionally be added as the next argument.
More than one region may be requested in a single argument, such as:
This will return the configuration bits and the contents of the ID locations.
To erase a device's program region (flash devices only), enter:
Any combination of regions may be specified in the
To write a device's configuration bits, enter:
This will try to write the value 0x3ffe to the device's configuration word. If it fails to verify it will return with a non-zero (failed) result. The configuration word value may be specified in hexadecimal, decimal, or binary:
The configuration word may also be written along with the program space with the command:
if the Intel Hex file named
The write and erase operations on program or data spaces can take a little while,
so a status bar is available in the form of a line of hash marks (#). The status bar is
Since the arguments are intrepreted from left to right, the
STDIN/STDOUT AND PIPING:
stdin and stdout are used to enable piping of picp with other applications. As a useless example:
will only display the lines relating to regions which are not blank.
will yield the same result as:
ORDER OF OPERATION:
Arguments are interpreted and executed in order, from left to right. This permits a sequence
of operations to be performed with a single command, such as:
This will first attempt to erase the program space, then write to it from a file named
If a modifier such as
it is important to note that the status bar will appear for the write but not for the erase, since the
The database of PIC descriptions is not quite complete. The flags indicating which regions are present on a given device (e.g., EEPROM data space) are only defined for a few devices. All others devices are assumed (for now) to have all regions, which may mean that, for instance, blank checking may return a result on a region that doesn't actually exist in the part. It's generally not harmful but it can be confusing.
The majority of PIC devices supported have not been tested. While every effort was taken to ensure accuracy, errors may be present in the PIC description database. If you encounter a device which appears to be incorrect, please let us know so it can be fixed in the next release.
|Please send comments, bug reports, suggestions, etc. to firstname.lastname@example.org.
|Last modified 27 September 2001|