Skip to content

StoneLabs/AVR-Programmer

Repository files navigation

GitHub tag (latest by date) GitHub issues Maintenance

Stone Labs. AVR-Programmer

Schematics and firmware for a portable In-Service-Programmer. It is designed to be powered by a 9V battery and uses an OLED Display module for user interaction. INTEL HEX Files can be flashed to target chips via an ISP-6 port directly from an SD-Card.

PCB

The Programmer is designed to sit on a portable ~9x11cm PCB. Eagle files for the PCB can be found in the schematics folder. Target chips can be programmed with the 6-pin Header located at the top of the PCB. There is also an 8Mhz clock pin available (TCLK) in case the target needs an external clock and none is available. BOM for the programmer can be found in schematics/bom-grouped.csv. All parts are available from DIGI-KEY. The price per assembled PCB should be around 10-30 bucks depending on the order quantity.

Aside from the programmer, there is target PCB design under schematics-target. The target can hold an ATmega328P like chip that can be programmed by connecting the target boards ISP Header to the programmer ISP-Port.

Picture of PCB revision 1 (Release_V-1.0)

PCB Version Status
Main PCB Hardware_V-1.0 Pull-Ups R1, R2 are connected incorrectly (to GND instead of +5V)! Assembled and tested. Works without R1, R2.
Main PCB Hardware_V-1.1 Fixed only R1, R2 and should work better than V-1.0. Untested!
Main PCB Hardware_V-1.1+ No functional hardware change.
Target PCB Hardware_V-1.2 Assembled and tested. Fully functional.

INTEL HEX

All .hex or .HEX files in the root folder of the SD-Card can be flashed to the target using the Programmer. The algorithm used for flashing the program to the target is very robust against weirdly formed hex files (e.g. line swaps, different lengths of lines in the same file, etc.). HEX record types 00, 01, and 02 are fully supported. Type 03 entries will be ignored with a warning sent to the programmers Serial output. Type 04 and 05 are not supported and HEX files containing those record types can't be flashed. (This shouldn't be an issue for AVR chips).

The programmer will also scan all possible bootloader positions for the current target and automatically set the fuse containing the bootloader position bits as needed.

Supported chips

#32CD32 Supported and tested
#FFA500 Supported not tested
#f03c15 Not yet supported

Chip Chip
#FFA500 ATmega1280 #f03c15 ATmega329A
#FFA500 ATmega1281 #f03c15 ATmega329PA
#FFA500 ATmega1284P #f03c15 ATmega329P
#FFA500 ATmega1284 #f03c15 ATmega329
#f03c15 ATmega128A #f03c15 ATmega32A
#f03c15 ATmega128RFA1 #f03c15 ATmega32C1
#f03c15 ATmega128 #f03c15 ATmega32HVB
#f03c15 ATmega162 #f03c15 ATmega32M1
#f03c15 ATmega164A #FFA500 ATmega32U2
#f03c15 ATmega164PA #FFA500 ATmega32U4
#FFA500 ATmega164P #f03c15 ATmega32
#f03c15 ATmega165A #f03c15 ATmega48A
#f03c15 ATmega165PA #FFA500 ATmega48PA
#f03c15 ATmega165P #f03c15 ATmega48P
#f03c15 ATmega168A #f03c15 ATmega48
#FFA500 ATmega168PA #f03c15 ATmega640
#f03c15 ATmega168P #f03c15 ATmega644A
#FFA500 ATmega168V #f03c15 ATmega644PA
#f03c15 ATmega168 #FFA500 ATmega644P
#f03c15 ATmega169A #f03c15 ATmega644
#f03c15 ATmega169PA #f03c15 ATmega6450A
#f03c15 ATmega169P #f03c15 ATmega6450P
#f03c15 ATmega16A #f03c15 ATmega6450
#f03c15 ATmega16HVB #f03c15 ATmega645A
#f03c15 ATmega16M1 #f03c15 ATmega645P
#FFA500 ATmega16U2 #f03c15 ATmega645
#FFA500 ATmega16U4 #f03c15 ATmega6490A
#f03c15 ATmega16 #f03c15 ATmega6490P
#FFA500 ATmega2560 #f03c15 ATmega6490
#FFA500 ATmega2561 #f03c15 ATmega649A
#f03c15 ATmega324A #f03c15 ATmega649P
#f03c15 ATmega324PA #f03c15 ATmega649
#FFA500 ATmega324P #f03c15 ATmega64A
#f03c15 ATmega3250A #f03c15 ATmega64C1
#f03c15 ATmega3250PA #f03c15 ATmega64M1
#f03c15 ATmega3250P #f03c15 ATmega64
#f03c15 ATmega3250 #f03c15 ATmega8515
#f03c15 ATmega325A #f03c15 ATmega8535
#f03c15 ATmega325PA #f03c15 ATmega88A
#f03c15 ATmega325P #FFA500 ATmega88PA
#f03c15 ATmega325 #f03c15 ATmega88P
#32CD32 ATmega328P #f03c15 ATmega88
#FFA500 ATmega328PB #f03c15 ATmega8A
#FFA500 ATmega328 #FFA500 ATmega8U2
#f03c15 ATmega3290A #f03c15 ATmega8
#f03c15 ATmega3290PA #FFA500 At90USB82
#f03c15 ATmega3290P #FFA500 At90USB162
#f03c15 ATmega3290
#FFA500 ATtiny24 #FFA500 ATtiny25
#FFA500 ATtiny44 #FFA500 ATtiny45
#FFA500 ATtiny84 #FFA500 ATtiny85

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org/

That being said, I'd really like to hear from you if you plan on using this project somewhere. And I for sure wouldn't mind some part if you use it commercially ;) (e.g. selling it etc.)