Content

WxPic
PIC Micro-controller Programmer

The PIC Microcontrollers are Microchip products.

Introduction

WxPic is an (approximated) porting of the DL4YHF's WinPic program in a Free Software development environment including wxWidget, MinGw, Code::Blocks, wxSmith.

In this version V1.0 Alpha, WxPic has only been tested with the PIC12F629 and a serial interface programmer. It is very likely that bugs remain for other PICs and other interfaces that were managed by the original program. Though PIC12F675, PIC16F630 and PIC16F676 are very close to PIC12F629 and therefore WxPic should work with them too.

WxPic V1.2 contains now the porting of the full WinPic sources including the 18F support that was missing in earlier versions.

WxPic license is identical to WinPic license:

Disclaimer
THIS SOFTWARE IS CONSIDERED 'FREEWARE'. THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In other words, THE ENTIRE RISK FOR THE USE OF THIS SOFTWARE IS WITH YOU. Permission is granted to use, modify, or redistribute this software so long as it is not sold or exploited for profit.
Use this program as long as you keep in mind that this program is no professional software ! Because this program is freeware, the entire risk of its use is with you. As usual, neither the author nor contributors will be liable for anything. This also applies to the schematic diagrams presented in this document, and in "the software" itself. A missing copyright note in these documents does not indicate "no copyright" for names of products or companies mentioned here.

WxPic included the WinRing0 version 1.3.1a libraries. The License and the source files are on OpenLibSys web site

The last version of WxPic and its sources are available on the WxPic web site.

Haut

What is WxPic made for?

In a single line, WxPic allows, with a PC and an adapter (programmer), to program a PIC micro-controller. With some more details, it allows to:

And WxPic also helps debugging a home made programmer by allowing to command manually the programmer inputs, or to adjust the timings of the programmer interface management.

Haut

List of supported Micro-Controllers

WinPic Support of PIC18Fxxxx is restored in WxPic starting with WxPic V1.2. This brings back the following devices (though none have been tested with WxPic yet):

Haut

System requirements

To use WxPic you need:

The supported programmers are:

Other programmers based on either the serial interface or parallel interface can be supported by using a text file describing its interface.

Haut

Command Line Arguments

You may call WxPic from a batch file, or an integrated development environment to do an automated job without any user intervention. For example, you can tell WxPic to load a program from a hexfile, write it into the target device, and terminate itself afterwards.

The following list shows all command line parameters which are accepted:

<any string not beginning with a slash>
considered a file name. If the command line contains a /p command ("program)", this file will be loaded into a buffer. If the file cannot be loaded, the evaluation of the command line is cancelled immediately; you can try to load the file "manually" then. If the command line contains a /r command ("read"), this is the name of the produced hex file. If there is only a filename specified in the command line, but none of the following "switches", the specified file will be loaded into WxPic's buffer automatically but not programmed into the device.
/p
program the buffer contents into the connected device
/e
erase chip. Not necessary to use this command together with the 'program' option because 'p' will automatically erase if necessary.
/r
read the contents of the device and dump them into the specified HEX file
/v
Verify. Compares the contents of the device with the specified HEX file. Can be used as an "extra" verification together with the /p command, but this is usually not required because the programming algorithms for most PICs include verifying.
/q
terminates WxPic. Should be the last argument, if you want to terminate WxPic after the job is done automatically. Without this command, you must close WxPic manually, even when running in command-line mode.
/q=5
also terminates WxPic, but waits for 5 seconds before quitting so you will have the chance to look at any output in the message window.
/nodelay
Usually, when command-line driven operation is active, the program waits for a few seconds until "the action starts". This can rescue a chip, because it allows you to terminate the erase-programming operation if you have started the wrong batchfile by mistake, etc. With the /nodelay option, there will be no pause before the execution of the command line starts.
/overwrite
With this option, WxPic won't ask before overwriting an already existing disk file. Use it together with the /r command if necessary.
/device=XXXX
Selects a new device type (to override the device used in the last WxPic session). Example: /device=PIC16F628 . No space characters are allowed in here !
/config_word=XXXX
Overrides the configuration word from any loaded hex file. The parameter XXXX is as a four-digit hexadecimal value.

The command-line driven operation can be cancelled by pressing ESCAPE. The main menu will be enabled anyway. Selecting certain menu items also cancels evaluating the command line.

Some command line examples:

WxPic keyer1.hex /p /q
Loads the file KEYER1.HEX, programs it into the connected device, and terminates WxPic ("quit").
WxPic /nodelay c:\pic\my_src\keyer1.hex /p /q
Almost the same, with full path to the hexfile, and a bit faster without the 3-second-pause during which the ESCAPE key is polled.
WxPic /overwrite /r "readout.hex" /q
Reads the contents, dumps the program to the file "readout.hex" (and overwrites the old file without asking). Terminates automatically.
Haut

The Human Interface

The WxPic Interface mainly consists in:

Haut

Glossary

The main terms used in the WxPic user interface and this help are the following:

Device
The used PIC micro-controller.
Code
The executable code (program) of the device.
Data
The non volatile data of the device.
Configuration
The configuration word(s) or more generally all the configuration and identification data.
Identification
The identification words that is defined by the user or attached to the device. The latter indicates the device model.
Buffer
The internal WxPic memory that holds the image of the code, the data, and the device configuration.
Hexfile
Text file that decribes the content of memory areas, usually generated by the Microchip MPLAB development tools. WxPic can also recreate those files by reading non-protected devices.
Programmer
Hardware peripheral that allows to read an program one or several device models.
Interface
The programmer interface through a serial or parallel port.
Haut