Short: PIC16 development package Author: rdc@cyberstorm.mtu-net.ru (Denis I.Sotchenko) Uploader: rdc@cyberstorm.mtu-net.ru Version: 1.5 Replaces: dev/cross/devpic.lha Type: dev/cross Current version of this package contains: picprog - my simple CLI-based PIC16 «development» programmer picasm - PIC12/16 assembler by Timo Rossi picreset - «in-circuit reset» tool picrecv - simple debugging tool for debug info printing All tools have full source code, ready for recompile. Binaries for 68000 included. You can recompile it for your CPU. Included picasm version has some differencies from original 1.06 version: some bugfixes and full PIC12/16 line support (from Microchip Product Line Card 3Q1999). I do not guarantee correct fuses values, but current picprog anyway doesn't support fuses embedded in HEX file. 1.4+ devpic package contains also MS-DOS version of picasm - it was done because I'm currently occupied in commercial PIC16 development, and my boss want to have ability to compile my source code :) maybe it can be useful for similar purpose. picasm.com was compiled using free Turbo C 2.01 (http://www.borland.com), and works even on PC/XT. picprog supports all current PIC16 Flash microcontrollers: PIC16C8x, PIC16F8x, PIC16F62x, PIC16F87x. It was really tested and works with PIC16F84 and PIC16F876. It has intelligent programming algorithm - before location programming it will read old value and will program location only if it is different. As a result, programming of new version of code may take only some milliseconds. Additionally, picprog has SmartFlash algorithm, usable for new (PIC16F84A and others) Flash PICs. If it will be enabled, picprog reads all code in temporary buffer and calculates time for two programming modes: erase programming cycles, and bulk erase and programming only cycles (programming only cycle for 16F87x is 2ms, erase programming - 4ms). If there are only some differencies (for example, if you compile new version of code with only one new constant), erase programming cycle will be performed. If there are MANY differencies (new commands at begin of program), picprog will erase all code (Bulk Erase command) and program chip by faster Programming Only commands. At result, v1.2+ picprog may program new Flash PIC16 up to 5 (five) times faster than old picprog and some other programmers. PicProg usage: picprog FILE [FORCE=xxxx] [CONFIGWORD=xxxx] [VERIFY] [SMARTFLASH=n] FILE - object file in Intel Hex format, generated by picasm or any other PIC assembler. FORCE - remove code protection with erase all code and data. This configuration word will be written BEFORE code programming and must not contain code protecting bits - because code may be written only without code protecting. CONFIGWORD - this configuration word will be written after programming of code. It is the only way to do code protect. SMARTFLASH - enables SmartFlash algorithm as described above. Argument is number of milliseconds required for Programming Only cycle (5ms for PIC16F8xA, 2ms for PIC16F62x and PIC16F87x). SmartFlash DOES NOT WORK WITH PIC16C84 and PIC16F84! VERIFY - additional verify cycle for better reliability. Configuration word must be entered in decimal form. You can find configuration word formats in PIC programming specifications may be found on Microchip website or free Microchip Technical Library CD-ROM. WARNING: picprog from version 1.3 has new version of hardware! New hardware doesn't require manual switching of 12v programming voltage, and does it automatically. New hardware is similar to old, and you can «upgrade» your old Epic programmer hardware. But you aren't forced to do it - new picprog is fully compatible with old hardware. Version 1.4 introduces v2 of hardware - optional diode for PIC16F84 in-circuit programming added. It is not required in any other cases. Some notes about hardware: I don't know non-exUSSR equivalents of used diodes and transistors. Probably, you can use any existing silicon ones. Notes about In-Circuit Programming: picprog allows to prorgam PIC even in circuit, without removal from socket. For using of this feature you must develop your circuit with following rules: - MCLR must be connected only with programmer - you can connect it with +5v or reset scheme, supervisor, etc - after development - usage of RB6 and RB7 are not recommended. - PIC16F84 may be programmed incorrect, because of working internal clock generator - internal programming logic of C84 and F84 shares one program counter with CPU, and if quartz or RC generator was started in programming mode and counts more than 72 cycles, program will be written to wrong addresses. devpic hardware v2 introduces new optional circuit (see scheme) that can be connected to OSC1 (pin 16), and it will flush generation during programming. Newer Flash PIC16 devices do not require this. (Note: diode must be placed on PIC side, not on programmer side) PicRecv usage: simply start it and it will receive debug info. For detailed info see debug info sending sample - source/picsend.asm. PicRecv requires in-circuit programmer connection. CTRL/C - exit from picrecv, CTRL/D resets PIC. Note: both picprog and picrecv own parallel port and can't be started simultaneously! PicAsm usage: included picasm package contains it's own documentation. All programs are tested and works ok with my current Amiga setup: A1200 Magic (ESCOM) in Slim case A3000 external keyboard Chinon FZ-357A HD floppy from A4000 35Mb RAM - 2chip, 32+1fast Blizzard 1260, overclocked to 59MHz Blizzard SCSI Kit Seagate Barracuda ST32171N 2Gb, Fast SCSI-2, 9.2Mb/s Quantum Fireball TM3840A 3.6Gb, IDE Selfmade IDE accelerator (up to 5Mb/s) Panasonic CR-572B 2x, IDE Multitech MT2834ZDX, 28.8 «Microvitec with DMS» 12" digital multisync CNet CN40BC 10Mbit combo PCMCIA Ethernet card Selfmade PIC-based PS/2 mouse controller and DATACOM PS/2 mouse POWERCOM UPS-400-A HP LaserJet 5L (manually exchanged with picprog if needed) System requirenents: OS 2.x (maybe - not tested yet) History: version 1.5 - added picrecv debugging tool w/src version 1.4 - new hardware version - added MS-DOS version of picasm version 1.3a - added useful picreset tool w/src version 1.3 - added support for new version of hardware version 1.2 - code protecting support - SmartFlash algorithm - all hardware support moved to separate section of source code - bug fixed: parallel port hardware was not correctly allocated - only 68000 binaries included: no speed differencies was found version 1.1 - first Aminet release Future versions will have: - MUI GUI - more advanced bedugging tools picprog, picreset and picrecv are FREE and PUBLIC DOMAIN. You can use them and source code for any puproses, incliding commercial use. picasm has it's own license. Intel is a registered trademark of Intel Corporation Microchip, PIC and ICSP are registered trademarks of Microchip Technology Inc.