Autoprogrammer Stand Alone AVR Programming - Page 1
Forum section: electronics / general

author: rx8pilot
author_rank: Super Contributor
timestamp: June 03, 2016, 02:24:45 am
content: After participating in another thread about AVR programmers, one of the forum members mentions he makes a stand alone with 256k for only $60. I bought it quick. It just arrived today and figured I would start a thread to document the experience. I have not yet used it and only briefly looked at the instructions. Having a stand-alone programmer should be a lot easier to deal with that one that must be attached to a PC of some kind. Let's see.THREAD:https://www.eevblog.com/forum/microcontrollers/hobbyist-avr-programmer/msg948935/#msg948935Here it is......super tiny. Hoping to CNC a case for it. There is a PC application that is used to program the device with a number of programs. It will also increment a serial number save into target EEPROM.

author: rx8pilot
author_rank: Super Contributor
timestamp: June 03, 2016, 05:33:55 am
content: Well, it took me about 5 minutes to install the program and read enough of the manual to successfully load a program on to the programmer and send it to a target. Could not have been any easier! Once the program and fuses were chosen, you simply click the 'PROGRAM AND TEST' button that loads and tests your target program into the EEPROM. When I plugged the programmer into the target board, it powers up, reads the ID and fuses. If the ID is good - it sends the program and the LED's light in sequence to show progress. All solid LED's means it is done. I verified the data with no issues.The application allows for compression which I disabled since I don't need it. It keeps track of how many successful cycles it has done.I soldered my own header no to the bottom of the board so that it matched the tag-connect cable I use.Next lesson is to figure out how to load multiple programs for different boards. Not yet sure how to select the program I want. After that, learning how to load the serial number of the target into EEPROM so I can display that to the end user for service. This way of programming is so much easier than a laptop with a programmer attached. It will also ensure that the person programming cannot easily change the program.These are being sold on eBay by a forum member named alank2 but I purchased mine directly from him. Paid with PayPay and he mailed it right away. Excellent work alank2!

author: alank2
author_rank: Super Contributor
timestamp: June 05, 2016, 11:54:35 pm
content: Thanks for the write up rx8pilot. If you have any questions, let me know!

author: rx8pilot
author_rank: Super Contributor
timestamp: June 06, 2016, 09:54:00 pm
content: Ok, first question:How do I setup the programmer to have multiple programs per chip type?For those following, the programmer is setup by associating the program with a particular signature of the target chip. When the unit powers up, it queries for the target chip signature and if it finds one that is loaded - it will immediately program the chip. This was remarkably simple - I have three boards with three different chips: MEGA328p, MEGA48PA, MEGA164p. Once the programs were all in the programmer, I simply plug it into the target - the unit programs and its done with nearly no effort.The next challenge is to have multiple programs for each chip. All of them need the test program that I use to make sure all the circuits are working and there was no assembly issue. Some of them have 2-3 variants of the firmware depending on how the final assembly will be used. The goal is to have all the programs loaded in the programmer all the time, but I am not sure how to best set this up. The manual seems to touch on this, but left out some details.

author: alank2
author_rank: Super Contributor
timestamp: June 06, 2016, 10:56:09 pm
content: Chapters 8-11 go through the ways you can do this.The first thing to match is the signature. As you said, it is easy to differentiate chips by signature, but when you have two chips with the same signature, you have to resort to other methods to select between them.The next method is to use match by fuse or lockbits. This works when you have different fuse values. Hopefully the two AVR's already have different values because they need to, but often you can set a fuse bit or two that does not matter to your application and then use that to identify them uniquely.The next method is the multiple match select (MMS) feature. If you create a configuration where more than one microcontroller configuration matches - for example, if you have two uC entries that are for the atmega328, then when it detects this, and blink twice and wait for button pressing. If you tap the button, it will switch to 1 and blink 1. Another tap will go back to 2 blinks. HOLDING the button will program the selected entry. It is important to understand that 1 represents the first microcontroller entry that matched, 2 is the 2nd that matched, and so on. I do this with a project - I have a basic firmware that is "1" and a deluxe that is "2". I connect, select the one I want, and program it. This feature is best for someone who understands how to use it which is likely not the end user.The next method is multiple programmers. You can have a programmer with one configuration on it, and a second one with another configuration. You can color code them or label them and use the "blue" one for one testing and the "red" one for final programming.Chapter 11 even has a very advanced configuration example that counts on using MMS at first (when programmed in house and the user knows how to do it), but then it sets fuses in such a way that once programmed, it will be fully automatic for subsequent uses (by the end user, etc.)I hope this helps!