WxPicPIC Micro-controller Programmer
The PIC Microcontrollers are Microchip products.
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:
- 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.
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:
- Loading a HEX file such as those generated by MPLAB the free tool from Microchip. This files defines the binary content of memory areas.
- Mapping these memory areas on the memory areas (code, data and configuration) of a PIC micro-controller model to be selected in a list of supported devices.
- Writting in the device the memory data completly or by part
- Reading the content of the micro-controller (if this is allowed by the device) either to compare it to the loaded memory, or to load it in memory.
- Reviewing, edit or save in HEX format the content of the loaded memory.
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
- PIC12F629, (tested)
- PIC12F675, PIC16F630, PIC16F676, (similar to tested PIC)
- PIC16C84, PIC16F84
- PIC16C61, PIC16C71
- PIC16C710, PIC16C711
- PIC12F635, PIC12F675, PIC12F683
- PIC12F609, PIC12F615, PIC16F610, PIC16F616
- PIC16F193x, PIC16LF193x (not tested & slow programming algo to be improved)
- PIC16F627, PIC16F627A, PIC16F628, PIC16F628A
- PIC16F636, PIC16F648A
- PIC16F684, PIC16F688
- PIC16F73, PIC16F737, PIC16F74, PIC16F76, PIC16F77
- PIC16F818, PIC16F819
- PIC16F87, PIC16F88
- dsPIC30F2010 -- dsPIC30F6010, dsPIC30F's
- And others by developping corresponding parameter files...
WinPic Support of PIC18Fxxxx is restored in WxPic starting with WxPic V1.2. This brings back the following devices:
- PIC18F2550 PIC18F4455 PIC18F4550 PIC18F2220 PIC18F2320 PIC18F2331 PIC18F2420 PIC18F2431 PIC18F2450 PIC18F2455 PIC18F2480 PIC18F2520 PIC18F2525 PIC18F2539 PIC18F2550 PIC18F2580 PIC18F2585 PIC18F2620 PIC18F2680 PIC18F442 PIC18F4220 PIC18F4320 PIC18F4331 PIC18F4420 PIC18F4431 PIC18F4450 PIC18F4480 PIC18F4520 PIC18F452 PIC18F4525 PIC18F4539 PIC18F4550 PIC18F458 PIC18F4580 PIC18F4585 PIC18F4620 PIC18F4680 PIC18F4685 PIC18F6527 PIC18F6585 PIC18F6680 PIC18F8490
To use WxPic you need:
- A PC running Windows XP or Vista,
- A supported PIC programmer,
- A parallel port (LPT1 or LPT2) ou série (COM1, COM2, ...) disponible compatible avec le programmateur PIC utilisé.
- F629 Programmer (tested)
- COM84 Programmer (code tested with F629 Programer)
- JDM (2) (code tested with F629 Programer)
- PIP84 (not tested)
- Tait Programmer (not tested)
- Microchip AN589 (not tested)
- NOPPP (or variant with pull-up) by Michael A. Covington (tested with a PIC16F84A)
Other programmers based on either the serial interface or parallel interface can be supported by using a text file describing its interface.Haut
Before running WxPic for the first time you must install it. This is a simple operation using the provided installer wizard. But this operation should be performed in a priviledged account. Else you won't be allowed to install for all users and you won't be able to use the parallel port.
To install WxPic, simply execute the downloaded multilanguage installer (WxPic-V#.#.#R###-installer.exe) and follow the instructions:
Choose your preferred installation language
Review and accept the licence terms and then confirm the installed components. You should not need to change any selection except that you can unselect the language support if you need only the English language. Note that the proposed WinRing0 driver depends on your operating system word size (32 or 64 Bits). This is automatically selected by the installer. The WxPic program itself is always 32-bit so it is compatible with both types of operating system.
Then at next step you will just have to confirm the installation directory by clicking on Install button. That's all, and WxPic should complete installation in less than 5 seconds.
Then you can run WxPic from your Windows Start > All Programs > WxPic > WxPic menu. Don't forget to run WxPic from an administrator account if you want to use the parallel port. In this case, under Vista or Windows 7, you will have to confirm that you accept to grant WxPic the administrator rights. Serial ports can be used from any user account.
On linux, installation is slightly more tricky than on Windows. It depends on the actual Linux version you may have. The binaries are provided only for Ubuntu 12.04 and for CentOS 5.7. They may be compatible with other versions and/or variants. You will have to try to know. If the binaries does not run on your OS you will have to build your own binaries. In this case, refer to the Build page.
In the case you are running a compatible OS or you want to install one version to assess if your OS is compatible with one of the binary, follow these instructions:
- Install the wxWidgets runtime package and its dependance listed in the Linux package table first row using yum (CentOS) or apt-get (Ubuntu) or their GUI.
- Download the binary TAR file for your OS, the name of which has the form WinPic-<OS>-<Release>-bin.tar.gz
- Copy the TAR file to the /usr directory
- Uncompress the TAR file: gunzip WinPic-<OS>-<Release>-bin.tar.gz
- Extract the files from the archive: tar xvf WinPic-<OS>-<Release>-bin.tar.gz
After installation, WxPic appears in the Application > Programmation Gnome menu. WxPic can be run with that menu. But this must be done from the root account to allow acces to parallel port. Using only serial ports is possible from any account.
Under Ubuntu the root account should not be used directly. It is recommended to use sudo to run a command with priviledges. The following command should be used to run WxPic under Ubuntu so that it can access to the parallel port:
sudo -H wxpic
Warning: it is important to not forget the -H sudo option. It allows to move the environment to the root account. This avoids WxPic to create its file with root priviledges in the user account. Those files would no longer be writable by the user. WxPic verifies this condition and warn the user when it is detected. It is not recommended to continue working in this way.
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:
For Linux replace the '/' parameter prefix by '-'
- <any string not beginning with a slash ('/') [a dash ('-') for Linux]>
- This string is 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
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.
Only one file may be specified. If it contains spaces, it must be enclosed between quotes (").
- Program the buffer contents into the connected device
- Erase chip. Not necessary to use this command together with the 'program' option because 'p' will automatically erase if necessary.
- Read the contents of the device and dump them into the specified HEX file
- Verify. Compare 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.
- Terminates WxPic after the job is done automatically + <n> seconds. <n> must be positive or null. Without this command, you must close WxPic manually, even when running in command-line mode. The time before quitting may allow you to look at the message window to verify the execution traces. Though note that if an error occurs during the execution of the command line operations, the execution of these operations are aborted. So the /q operation executed at the end will never be executed in case of error.
- 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.
- With this option, WxPic won't ask before overwriting an already existing disk file. Use it together with the /r command if necessary.
- 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 !
- Overrides the configuration word from any loaded hex file. The parameter <hex-value> is as a four-digit hexadecimal value.
- Select the session <session-name> (ignoring case) instead of the Default Session that is used by default when parameters are specified on command line. If no session name is provided (/session=) it is the Default Session that is used whatever its name.
If the session name contains spaces, the parameter must be enclosed between quotes (for example: /session="My Session" or "/session=My Session")
Under Windows it is not possible to specify a session name containing quotes.
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.
The WxPic Interface mainly consists in:Haut
The main terms used in the WxPic user interface and this help are the following:
- The used PIC micro-controller.
- The executable code (program) of the device.
- The non volatile data of the device.
- The configuration word(s) or more generally all the configuration and identification data.
- The identification words that is defined by the user or attached to the device. The latter indicates the device model.
- The internal WxPic memory that holds the image of the code, the data, and the device configuration.
- 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.
- Hardware peripheral that allows to read an program one or several device models.
- The programmer interface through a serial or parallel port.