ISPnub - Stand-alone AVR In-System-Programmer Module

Features

No external power supply needed. Uses voltage provided by target (1.8V to 5.5V).

Programming counter. Limit possible programming cycles. After allowed cycles, no further programming is possible (module has to be erased/reprogrammed).

One-button-programming: connect - push button - wait for red led off.

Simple LED schema: green on = ok green blink = counter expired red on = programming red blink = error

Define programming with simple script. Script converter generates HEX file for module.

Load module with any ISP programmer which supports ATmega1284p

120kB memory space for programming data

Usage

1. Preparing: Load programming instructions into ISPnub

CONNECT 2000000 ; connect with SCK = 2 MHz SPIVERIFY 0x30, 0x00, 0x00, 0x00, 0x1E ; check signature byte 0x00 (0x1E = manufactured by Atmel) SPIVERIFY 0x30, 0x00, 0x01, 0x00, 0x93 ; check signature byte 0x01 (0x93 = 8KB Flash memory) SPIVERIFY 0x30, 0x00, 0x02, 0x00, 0x07 ; check signature byte 0x02 (0x07 = ATmega8 device) SPIWRITE 0xAC, 0x80, 0x00, 0x00 ; chip erase WAIT 2 ; wait 20 ms FLASH ../test/main.hex, 0, 64 ; flash given hex file starting at flash address 0 with pagesize 64 DISCONNECT ; disconnect SPI DECCOUNTER 10 ; allow 10 programming cycles END

java -jar ISPnubCreator.jar test.ispnub ispnub.hex

avrdude -c usbasp -p atmega1284p -U hfuse:w:0xD9:m -U lfuse:w:0xE2:m -U flash:w:ispnub.hex -U lock:w:0x3C:m

2. Flashing: Program target controllers

Connect ISPnub to target (ISPnub is powered from target!)

Green LED is on, if ISPnub is ready

Press button -> programming starts. While programming, green and red LEDs are on.

On success: green LED is on, red off.

On error: red LED blinks. Press button to start new programming cycle

Download

Hardware

Schematic

Partlist

Partnumber Value Reichelt Mouser C1, C2 100n X7R-5 100N 80-C0805C104K5R IC1 ATmega1284P-AU ATMEGA 1284P-AU 556-ATMEGA1284P-AU JP1 2pol 2,54mm MPE 087-1-002 571-826936-2 LED1 LED0805 red SMD-LED 0805 RT 604-APT1608SURC LED2 LED0805 green SMD-LED 0805 GN 604-APT2012SGC R1 10k 1/4W 10K 603-SR0805JR-0710KL R2, R3 1k 1/4W 1,0K 71-CRCW0805-1.0K-E3 S1 Switch TASTER 9314 693-1301.9314 X1 10pol WSL 10W 517-N2510-5002RB M1 Jumper JUMPER 2,54GL SW 517-9691020000DA

Gallery



3d printed case for ISPnub.

ISPnub case on Shapeways



by MxChristensen (08/2020)

Links

Before ISPnub can flash controllers, it has to be flashed itself with the programming instructions.A programming script defines with simple commands the steps for the programming process. This method is very flexible and can be adopted for almost all AVR controllers. See the ISPnub Programming Script Manual . The sequences for serial programming are described in the datasheet of the specific AVR microcontroller. Here is a example of a simple programming process ("test.ispnub"):Clock switching and EEPROM writes can also be realized with ISPnub. Here is an enhanced example which uses such features: example.ispnub The hex file for the ISPnub is generated with a Java tool (see download section):Now the "ispnub.hex" can be flashed with your favorite programmer (e.g. USBasp ) into the ISPnub module. Set the jumper on the ISPnub while programming (and don't forget to remove the jumper after flashing!). Here is an example which uses avrdude and USBasp:... ISPnub is now ready for stand-alone flashing.Video hosted on Youtube:Using the prepared ISPnub is very easy. Just follow these steps:To use ISPnub, just one tool is needed: ISPnubCreator. It generates from programming instructions a hex file for the ISPnub. The tool is written in Java and can be used on many different platforms (Windows, Linux, Mac, ..). ISPnubCreator_v1.3.jar (2014-09-01; 9,9 kB) Support for target controller with flash up to 256kBytes ISPnubCreator_v1.2.jar (2014-04-10; 9,9 kB) Skip blocks with 0xff, added EEPROM command ISPnubCreator_v1.1.jar (2014-04-03; 8,3 kB) ISPnubCreator_v1.0.jar (2013-06-14; 14,7 kB)The source code is hosted on Github: ISPnubCreator and ISPnub firmware The main component of ISPnub is an ATmega1284P.Regarding ISPnub: Reichelt Bauteil Warenkorb zu ISPnub v1.1 (part list for ISPnub)Other AVR programmers with stand-alone function:Standalone programmer for other microcontrollers: PicKit Programmer-to-go (for Microchip PICs)