Program: P84.COM Author: John Wilson, D Bit Description: P84 programs Microchip PIC16F84 CPUs using the popular "COM84" programmer circuit available on the Internet, and probably common variations too, connected to (and often powered by) a PC COM port. Unlike some other free PIC software, this programmer works fine on fast PCs, and does not suffer from the Borland divide overflow library bug. It uses the PC timer chip rather than delay loops for fine-grained timing so it ought to work just as well on future even faster CPUs (no guarantees of course!). This programmer works entirely from the command line, and sets the return status appropriately depending on success or failure, so it can be used from within makefiles. If you like playing with a mouse and filling out the same form every time you burn a chip, use other software. The executable file is less than 4 KB so it loads fast, even from a floppy. Devices: Currently only the 16F84 is supported, however the program uses pointers to call all device-specific subroutines and variables for memory sizes, so it would be simple to add support for other serial-programmable PIC devices. If you've got a favorite device drop me a line (or better yet, send me a sample!) and I'll probably add support for it if I'm not too busy with other work. Copying: This program may be freely distributed and/or modified as long as the copyright notice and primary author credit are left intact. It may be used for any purpose including commercial use, however keep in mind that the COM84 circuit doesn't have programmable power supply voltages so it does not fit Microchip's definition of a "production" programer. Somehow I have trouble taking Microchip's definition too seriously, since it seems to me that marginal testing to detect programming failures mainly matters when Microchip sells you defective parts (unless the problem is caused by violating the programming voltage specs to begin with, but that's a separate issue). But that's the official word. Command line: The basic command line looks like this: P84 [filename[.HEX]] [/switches] The filename refers to the file(s) that contain(s) (or will receive) the Intel hex data. It is not needed for the /BLANK or /ERASE commands. Normally this is a single file with the default extension of .HEX, unless the /INHX8S switch is used, in which case the filename refers to two files with extensions .HXL and .HXH (in this case you definitely don't want to specify an extension because if you do then the one filename will be used for both files). If no filename is specified for a command that reads or writes hex data, then standard input/output are used. Again, this is almost definitely not what you want if you're using the /INHX8S switch. The switch(es) specify what operation is to be performed. They can be anything from the following list, and if you specify more than one then they're done in the order shown; note that if you specify both /WRITE and /READ, the same filename will be used for both so the input file(s) will be overwritten with the data from the part. If no command switch is specified at all, the default is /WRITE. /ERASE erase part (including data EEPROM) /NOERASE don't erase before writing /BLANK verify that part is blank /WRITE erase part, then write file(s) to part, verifying each word written /VERIFY verify (compare) file against part /READ read part into file(s) The following switches modify the above commands: /COMn specify port for COM84 board (n=1-4) /INHX8M use merged .HEX file (default) /INHX8S use split .HXL/.HXH files for low/high bytes /INHX32 use merged .HEX file w/32-bit addressing (pointless on a small part like the 16F84, the only effect is to include an extra record in output files to set the high 32 bits of the address to 0) /PIC16F84 part type is PIC16F84 (this is the default and is currently the only choice anyway, but the switch is there for compatibility with future versions) Any error causes P84 to turn off the programmer and abort with an error message. Language: Borland Turbo Assembler. Disclaimer: All trademarks are acknowledged as the property of their respective owners.