The cisp
program provides read and write access to
the flash and EEPROM memories of Atmel AVR® microcontrollers
via the Atmel serial programming interface (SPI) on Unix-like
systems and Windows computers equipped with a serial or
parallel port.
I wrote this program, because I wanted that the end users of my C2N232 adapter can easily update the firmware.
Existing solutions supported only either Unix-like systems or Windows and did not support the kind of RS-232 programming interface that was needed.
Before writing cisp
, I used UISP.
I wanted to avoid C++ and write table-driven
object oriented
C instead.
Update 2007-09-30: AVRDUDE offers a
superset of the features of cisp
. I do not indend to
maintain cisp
any more.
The table of supported devices is in the file spi.c
.
Currently, cisp
supports the following devices:
AT90S1200, ATtiny12, ATtiny15, AT90S2313, AT90S2343, AT90S2323,
AT90S2333, ATtiny22, AT90S4414, AT90S4434, AT90S4433, AT90S8515,
AT90S8535, ATmega8, ATmega161, ATmega163, ATmega16, ATmega323,
ATmega64, ATmega103 (old and new version), and ATmega128. The author
has tested the AT90S2313, ATmega103 (old version), and ATtiny12.
Here is an example of adding support for a new device, the
ATtiny2313. Not all of its programming protocol has been
implemented in cisp
, but flash programming does work
with the following entry.
diff -pu cisp-1.0.5/spi.c cisp/spi.c --- cisp-1.0.5/spi.c 2005-08-06 16:40:59.000000000 +0300 +++ cisp/spi.c 2007-05-18 17:39:34.000000000 +0300 @@ -245,6 +245,7 @@ static const struct avr devices[] = { 0x91, 0x03, "AT90S2323", 2048, 0, 128, 4, 4, -1, 0 }, { 0x91, 0x05, "AT90S2333", 2048, 0, 128, 4, 4, -1, 0 }, { 0x91, 0x06, "ATtiny22", 2048, 0, 128, 4, 4, -1, 0 }, + { 0x91, 0x0A, "ATtiny2313", 2048, 32, 128, 5, 4, 0, 0 }, { 0x92, 0x01, "AT90S4414", 4096, 0, 256, 4, 4, -1, 0 }, { 0x92, 0x02, "AT90S4434", 4096, 0, 256, 4, 4, -1, 0 }, { 0x92, 0x03, "AT90S4433", 4096, 0, 256, 4, 4, -1, 0 },
New cable layouts can be added to the table in
comm/commsel.c
. The supported RS connections are: c2n232,
dasa, and ponyprog. The supported cables for the parallel interface
include dapa, dt006, and STK200 (or STK300). Except for c2n232, these are a subset
of the interfaces supported by UISP.
don’t carebits in response from the SPI device.
-d
parameter is specified. The program is included in
the AVR Cross
Development Kit for RPM-based GNU/Linux distributions.-p
for disabling byte polling,
as it does not work reliably some devices. Corrected a bug
in option -L
(writing to EEPROM). Previous versions
of cisp
would send the wrong command to the device,
writing to Flash ROM.