ISPnub - Stand-alone AVR In-System-Programmer Module
ISPnub is a simple to use stand alone programmer intended for flashing AVR controllers in the field directly in the target system or during production. The module has only one button and two leds as user interface.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
Before ISPnub can flash controllers, it has to be flashed itself with the programming instructions.1. Preparing: Load programming instructions into ISPnub
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"):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 ENDClock 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):
java -jar ISPnubCreator.jar test.ispnub ispnub.hexNow 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:
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... ISPnub is now ready for stand-alone flashing.
Video hosted on Youtube:
2. Flashing: Program target controllers
Using the prepared ISPnub is very easy. Just follow these steps:- 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
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.4.jar (2020-12-18; 10,7 kB) Minor fix on LED pin handling
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.
Hardware
Schematic
The main component of ISPnub is an ATmega1284P.Partlist
ISPnub PCB (3x)
Order ISPnub-PCBs now!
Interested in assembled boards? Please contact me!
€ 12,90
incl. 19% VAT excl. € 4 shipping
Order ISPnub-PCBs now!
Interested in assembled boards? Please contact me!
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
Please tell me about your ISPnub project!
3d printed case for ISPnub. ISPnub case on Shapeways by MxChristensen (08/2020) |
||
Es-tronics built his own version of ISPnub. He added an USB connector for powersupply during programming of the ATmaga1284p and packed the board into a 3d printed enclosure. by es-tronics (12/2020) |
||
Wolfgang has developed a programming and test adapter for a relay board. The target circuit is contacted via test pins. Besides the ISPnub functionality for programming a console and a test program was implemented on the ATmega. by Wolfgang K. (02/2021) |
||
This version was designed by Bernhard. It is prepared for use with pogo pins. by Bernhard R. (11/2021) |
||
3d printed enclosure for ISPnub. ISPnub enclosure on Thingiverse by semiversus (02/2022) |
Links
Regarding ISPnub:ISPnub Programming Script Manual
Top view of ISPnub pcb and parts
Reichelt Bauteil Warenkorb zu ISPnub v1.1 (part list for ISPnub)
Other AVR programmers with stand-alone function:
AVR-ISP500-TINY
Arduino Stand-alone Programmer Kit
Standalone programmer for other microcontrollers:
PicKit Programmer-to-go (for Microchip PICs)