----------------------------------------------------------------------------- Picsy - PIC-, AVR- and I2C-EEPROM device programmer ----------------------------------------------------------------------------- Copyright (C) 1996-2000 Johan Dahlberg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ----------------------------------------------------------------------------- Table of contents ================= 1 Introduction 2 Supported chips 3 Revision history 4 Command syntax 4.1 Erasing devices 4.2 Programming devices 4.3 Verifying devices 4.4 Reading devices 5 Contacting the author ----------------------------------------------------------------------------- 1 Introduction =============== Picsy is a simple tool that allows programming of PIC- and AVR- microcontrollers. It also is possible to use it to program I2C-EEPROM chips. The software requires a programming adapter connected to the serial port. Have a look at the ISP-* files in the gfx directory. 2 Supported chips ================== Currently supported chips are: Atmel MCU:s Microchip MCU:s I2C EEPROM ------------------------------------------- (AT90S1200) PIC16C84 24C01 AT90S2313 PIC16F84 24C02 (AT90S2323) 24C04 (AT90S2333) 24C08 (AT90S2343) 24C16 (AT90S4414) 24C32 (AT90S4433) 24C65 (AT90S4434) AT90S8515 (AT90S8535) ([ATmega103]) (ATmega161) (ATmega603) (ATtiny12) (ATtiny22) Devices within brackets () are not tested with Picsy. Note that all I2C-EEPROMs don't use the same protocol, i.e. some devices from some vendors will not work well with Picsy. e.g. Xicor's 24C01 will not do, but Xicors 24C01A will. Picsy will work well with Microchips and Atmels I2C-EEPROMs. Picsy will not be able to program the upper 64KB of the ATmega103s program memory. (I guess you wouldn't use Picsy for programming this device anyway, but rather a special purpose parallel programming device) Atmels ATtiny chips has two serial programming modes: high and low voltage. Picsy does only support the low voltage programming mode. Since some chips (ATtiny10, ATtiny11) only supports the high voltage programming mode Picsy will not be able to program them. In order to support them Picsy would need a different hardware interface - and as long as nobody asks for it I will not design one. Another chip that definitively will not be supported is the AT90S8534, since it lacks the SPI interface and needs to be programmed in parallel mode. 4 Revision history =================== Changes in Picsy 1.07: New chips supported: ATmega161 ATtiny12 ATtiny22 Signature for AT90S2323 and AT90S2343 corrected (Thanks to Thomas Bäckdahl) Added feature: Signature will be printed for unrecognized AVR chips. Added LOCK and FUSE commands to program the AVR lock and fuse bits. MSDOS is currently not supported - one static array is too large... 4 Command syntax ================= The command syntax is somewhat depending on the operating system you are running. If you simply run Picsy without any arguments a short description on the command syntax for your OS is displayed. 4.1 Erasing devices -------------------- There is usally little use in erasing devices, since Picsy always erases flash-memory chips before actually programming the chips. I2C-EEPROM devices will be "erased" by programming all cells to the value "0". Example: picsy erase PIC16C84 /dev/ttyS1 will erase a PIC16C84 on a Linux box, programming adaptor connected to the second serial port. 4.2 Programming devices ------------------------ When programming a flash-memory chip, Picsy will erase the entire chip before doing the actual programming. When the programming has completed, the chip will be verified (except when programming a PIC-processor with the code protection bit set). If an AVR-processor has been programmed using a parallel programming device, its in-system programming feature might be disabled. Then there is no way for Picsy to program the chip until this function has been enabled by a parallel programming device. When you assemble a file using Avrasm, actually two files will be created (in case you have included some data to reside in EEPROM in your code). One of them is .hex and the other is .eep , where .asm contains program data to reside in the AVR flash-memory. .eep is consequently containing data to reside in the AVR EEPROM. So, when you use Picsy to program an AVR-chip you invoke it by typing: picsy program .hex Picsy will now also look for the file .eep, which has to be in the same directory as the file .hex. If this .eep file is found Picsy will use it for programming the EEPROM, otherwise the EEPROM will not be programmed - without any kind of warning message. Example: picsy program AT90S8515 test.hex 2 will program an AT90S8515 chip with the contents of the file test.hex (and test.eep if it exists) on an MSDOS-box, programming adaptor connected to COM2. 4.3 Verifying devices ---------------------- Verifying - is the data in the hex-file really in the chip as well? Example: picsy verify AT90S1200 test.hex /dev/ttyS3 will verify that the data in the file test.hex (and data in test.eep if it exists) is in the chip. (Linux box, programming adaptor connected to the fourth serial port) 4.4 Reading devices -------------------- Picsy is also able to read data from a chip and write the data into a hex-file. In case of an AVR-chip actually two files will be written. One containing the program data from the flash-memory and one containing the data from the data-EEPROM. If you try to read a read-protected chip the output file(s) will contain nothing but garbage, Picsy will not give you any kind of warning message. Example: picsy read PIC16F84 test.hex /dev/ttyS1 will read the PIC and write all program and data memory contents, as well as the fuse bits into the file test.hex. 5 Contacting the author ======================== Before reporting any bugs, please have a look at http://www.admittansen.studorg.liu.se/picsy, where the most recent software version will be available. Please feel free to send any comment or bug report to: johan_d@lysator.liu.se