All Them Files...
All Them Files....
Assembly language aside, the most confusing thing about programming PICmicro's is the different files and what they do. It's actually quite simple, but in memory of the annoyance it caused me I'll explain the process briefly for the benefit of people just starting out with PIC programming.
The bare minimum software requirements for programming a PICmicro are a text editor, (notepad is fine) a console based assembler, (usually MPASM) and the software to run the programmer hardware. You use your text editor to write your source code in assembly language and save it in a text file with the extension ".asm". Then you assemble the source file with your assembler software, (usually by typing mpasm file.asm at the DOS console) which spits out a ".hex" file which contains an image of your PICmicro's code memory in hexadecimal text. You then have to point the programmer software to this .hex file to program the chip.
All this boils down to an annoyingly slow development cycle. (the time taken to re-program and test a modification to the source code) What is really needed is a Windows based application in which you can assemble and program your source with a single keystroke and without dealing with all the different files.
Microchip provide, for free, a windows development environment called MPLAB. It's about 35MB and can be found on their website. (see Links) Unfortunately, last time I looked it wasn't really much use for anyone not using a Microchip programmer. MPLAB provides a multiple document interface (MDI) for editing source code and plenty of other features but it doesn't have a means to interface to third party programmer software. So you still have to play around with the .hex files and your programmer software.
I have taken steps towards a solution by beginning development of a Windows based IDE (Integrated Development Environment) specifically designed for assembly programming with the Wisp628 PIC Programmer. No, it's not ready yet but it's getting there.... In the meantime I'll go over the console tools that most people will have to use in the meantime.
First of all, a list of the DOS tools I have used for PICmicro programming:
MPASM is the original PICmicro assembler. It's a DOS based application which runs on Win16 and Win32 systems. Support for the newer PICmicro's is getting harder and harder to find with this assembler, but it does seem to exist.
GPASM is a Win32 only console assembler which makes every effort to be compatible with MPASM syntax. It's an open source title so you can make your own improvements and refinements if you know how to program in C.
CVASM is quite an old DOS based assembler which only really supports the 16Fxx/16Cxx devices. It isn't quite compatible with MPASM syntax so take care if you find you need to use it. I think it's mostly different methods of defining radix, but I'm not sure.
The WispTool is the original DOS tool for the Wisp628 Programmer. It's a bit unreliable on Windows NT system, I suspect it requires direct hardware access. (again, not sure) I only really use this if I have to program under Win16.
XWisp2 is a recreation of XWisp (which is written by the author of the Wisp628 Programmer) but it is written in C, not Python. This means you don't need to install a whole heap of run-times in order to use it. I recommend this over the original WispTool when using Win32 systems.
All the titles I have mentioned are either freeware or open source. The easiest way to get these tools is with a Google Search.
Due to a general drift away from Windows and towards Linux, I am no longer developing Wisp628 IDE. The source code would be available at the bottom of this page, but I seem to have misplaced it. If you happen to be one of the few people I emailed the source code to a few months back, please contact me so that I can post it here for everyone.
In an attempt to speed up the development cycle I am working on a Windows IDE for the Wisp628 PIC Programmer. When completed, Wisp628 IDE will check your source code for errors, assemble it and program it into the target chip with a single key press. (F5 at the moment....)
Some of the features I intend to include, or have already included:
Suggestions are, of course, fully welcome.
When finished Wisp628 IDE will be open source, written in Visual Basic. Anyone with basic programming skills will be able to tailor the software to their needs.
Finally, a few preview screenshots:
Error checking and selection.
Interface to any extra software tool you need.
If you have any comments or suggestions please don't hesitate to contact me.
|Return To Top||Last Updated: 13/02/2007||Home Page|