Hobbyist AVR Programmer - Page 1
Forum section: electronics / general

author: kolbep
author_rank: Frequent Contributor
timestamp: May 24, 2016, 08:59:23 pm
content: Hi All,Just wondering what you would recommend for an AVR Programmer (Searching the Forums gives a thread from a few years back (things might have changed since then).I have mainly played around with PIC Micros, using the Paralell Port to Program them (in the 16f87 days) then Pickit 2 and Pickit 3.Lately I have been playing around with Arduinos and AVR's.What I like to do is get something working on an Uno, then take a Micro (eg Atmega), stick it on a breadboard or custom board / veroboard, and program it with the same code.To Program it, I would load the Arduino as an ISP code onto the Uno, then put the capacitor on Reset, jumper the Uno across to the board.Then once I get past the programming settings (Baud Rate...) using AVRdude, it seems to work.But it is a very clumsy way to do it.What I want is something similar to the Pickit2/3, that can program the chip, and possibly debug.I see the very cheap (2usd) programmers on Ebay, that have 1 micro and a few other passives. Are those any good.One thing that has lead me to this is that I have programmed an ATMEGA8515 with a program.Later I decided to stick another program on it. But I get verify errors.Then I try the AVRdude -e, and the Avrdude terminal erase.It then says ok, I then quit, and it gives me a question, the fuse bits have changed. Ignore or RestoreIf I restore the fuse bits, Avrdude just hangsIf I Ignore, then I see that the 8515 just continues running the old program (despite it supposedly loading the new program, or erasing)Any Idea on this oneAppreciate itP

author: Gyro
author_rank: Super Contributor
timestamp: May 24, 2016, 09:17:44 pm
content: The ebay USBasp programmers seem to work fine (well mine does anyway).I've found that Sinaprog is a nice windows front-end for AVRdude. I think the latest version on the web is 2.1

author: janoc
author_rank: Super Contributor
timestamp: May 24, 2016, 09:29:17 pm
content: USBasp works, but has issues with programming AVRs with more than 32kB of memory, if I recall right. I am not sure whether that was fixed in a later firmware version, but the cheap eBay clones usually have an ancient version. It may not matter for programming an Uno, but if you want to work with Mega256 you won't be able to program it. Also many USBasp clones will not work with anything else but 5V targets.A better solution is AVR Dragon or AVR-ISP. Dragon does also the high voltage programming which is often the only way to "unbrick" a chip where you have screwed up the fuse settings and ISP doesn't work anymore. If you don't want to bother with babysitting Dragon (it is famously fragile due to some design issues), get Atmel-ICE and you have a full programming and also debug solution for all Atmel MCUs.

author: dannyf
author_rank: Super Contributor
timestamp: May 24, 2016, 09:41:21 pm
content: my vote to usbasp as well. I use avrdudess as the front end. works like a charm.Have a dragon but haven't used it a long time. and a stk II somewhere too.

author: alank2
author_rank: Super Contributor
timestamp: May 24, 2016, 10:00:45 pm
content: If you are looking for a standalone programmer for ISP/PDI, I developed one that, once programmed, doesn't need a PC. It can handle multiple firmware in one configuration as well.http://www.ebay.com/itm/AVR-Automatic-Programmer-ISP-PDI-Independent-Standalone-for-Atmel-64KB-EEPROM-/291759576356?ssPageName=STRK:MESE:IThttp://home.earthlink.net/~alank2/autoprog_manual.pdfhttp://home.earthlink.net/~alank2/autoprog_pcapplication.zipThanks,Alan

author: Mastrofski
author_rank: Contributor
timestamp: May 24, 2016, 10:21:57 pm
content: The Atmel ICE is typically what I use for that. Granted I use Atmel Studio to program the thing, but it will do all of the AVR architecture stuff as well as their SAM line. I don't believe it will debug the AVR stuff(at least I haven't found a way), but it will debug the SAM chips. I've found that it works great for the stuff that I'm working with, you just need to have access to the SPI lines in order to program the thing.

author: rx8pilot
author_rank: Super Contributor
timestamp: May 24, 2016, 10:29:52 pm
content: Quote from: alank2 on May 24, 2016, 10:00:45 pmThat thing looks fantastic. Is it your design/software?

author: alank2
author_rank: Super Contributor
timestamp: May 24, 2016, 10:33:42 pm
content: Quote from: rx8pilot on May 24, 2016, 10:29:52 pmThank you, yes. I've been an AVRfreak for a long time! This was designed for someone else and it turned out so much better than I even expected. If you have any questions, shoot!

author: Macbeth
author_rank: Super Contributor
timestamp: May 24, 2016, 11:12:55 pm
content: Atmel STK200 with parallel port dongle, USBasp, and TL866CS converted to TL866A here. Oh and of course the Arduino STK500 emulator.USBasp and avrdude is what I use if at hand, but my desk is a tip and so I use whatever is closest. Also the parallel programming of the TL866 is useful to unbrick a bad fuse job.I've never tried in circuit debugging stuff though.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 24, 2016, 11:34:21 pm
content: Quote from: alank2 on May 24, 2016, 10:33:42 pmdont use the word as someone around here will find it weird and dangerous advice...

author: westfw
author_rank: Super Contributor
timestamp: May 24, 2016, 11:35:00 pm
content: How much are you willing to spend?Arduino Nano clones are cheap enough that you can put the ArduinoISP sketch in one, disable RESET permanently, and use it as your programmer. About $3, including the extra wires. No debugging, though.At about the same price are the Chinese USBASP clones, but they're less capable overall...At about $10 (alas, not including shipping) you can get a genuine Atmel ATmega328p (or ATmega328pb) Xplained Mini eval board. This is more-or-less arduino compatible, but has an on-board mEDBG chip, so it can be use the the Atmel Studio debugger. I *think* you can use it for programming other AVRs as well. But it's a real bargain for something that does debugging.At about $50 you can get things like the "Atmel ICE", an official Atmel debug tool that supports most of the possible AVR programming methods (SPI, TPI, PDI, and JTAG; still no HV protocols, though.) It will also program/debug Atmel ARM chips. (Atmel ICE is the most recent version. Atmel JTAGICE3 is also pretty good and has been showing up cheap.)

author: rx8pilot
author_rank: Super Contributor
timestamp: May 25, 2016, 01:40:18 am
content: I also use the Atmel ICE (genuine) for prototyping and production. For development, it's used with Atmel Studio where it is obviously well supported and never have any issues. It replaced my Atmel AVRISP which died one day.For production programming, I use AVRdudess which is a GUI for AVRdude. It took a bit to understand that AVRdude communicates differently and I have to configure some USB filters. Minor challenge - it now works just fine (most of the time). Sometimes it freaks out and stops responding for reasons I do not understand.I really look forward to @alank2 stand-alone solution. I need 2 of them, which I will machine a case for to send to my customers to update their systems. I have high hopes for those gems.For hobby use, It may not be helpful, but I use the Tag-Connect cables and love them for production and proto work.

author: alank2
author_rank: Super Contributor
timestamp: May 25, 2016, 01:43:07 am
content: I received an order for two of them tonight, but it was from a customer who ordered from me before - this isn't you rx8pilot, right? If you need some you can contact me via PM and we can avoid eBay. I can put the right angle female connector if you want to direct plug them, or a male shrouded connector for use with a ribbon cable if you prefer that.

author: rx8pilot
author_rank: Super Contributor
timestamp: May 25, 2016, 01:54:35 am
content: I will PM you as soon as my wife (Chief Financial Officer), authorizes my purchase order for 2 of the 256K versions. The regular 6-pin should be fine I think.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 25, 2016, 02:22:19 am
content: Quote from: alank2 on May 24, 2016, 10:00:45 pmnice idea.. can you work on high voltage avr programming? so we can use reset pin as general purpose IO... if you can, i will look forward to it if the price is right...

author: alank2
author_rank: Super Contributor
timestamp: May 25, 2016, 02:32:45 am
content: Quote from: Mechatrommer on May 25, 2016, 02:22:19 amThank you - I have to drag out my old dragon or stk500 for HV!! Sadly, it doesn't do HV.The initial version did ISP and an update added PDI, so it can do ISP and PDI now.It was originally designed for customers to update firmware without any user intelligence. You can load multiple firmwares on it and it can detect which AVR is it connected to and load the correct one all automatically. I use it all the time for programming my projects - I have a single one programmed with 4 firmware images. it also has the ability to embed a serial number in the flash area as well that will auto-increment each time you program it. I often find it is easier to program it and take it to what I want to program than to haul my notebook. Take a look at the manual if you get a minute.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 25, 2016, 02:44:06 am
content: that are good for production purpose, its a great bonus to be standaloness... incremental SN is also great idea, i exactly thought about the need few days ago, but as i am mainly hobby, the my non automated PC based AVRISP MK2 clone still can do the work, my production is very little in order of 1 or 2 pieces only, so manual flash write is still feasible... what i really crave is the need to use reset pin as general IO, which my programmer is crippled at doing... the existing HV programmer is expensive, so i'll live with what i already have and only.

author: kolbep
author_rank: Frequent Contributor
timestamp: May 25, 2016, 04:31:00 am
content: Thanks All.Lots of ones to consider now.Appreciate it.

author: Brutte
author_rank: Frequent Contributor
timestamp: May 25, 2016, 06:17:14 am
content: QuoteWhy don't you program AVR8 with PICKit2?AVRDude supports USBasp and PICKit2 equally well, cannot see why one is preferred over other.As for debugging AVR8 - all Atmel AVR8 debugging protocols are proprietary == expensive debuggers with closed source drivers.

author: janoc
author_rank: Super Contributor
timestamp: May 25, 2016, 06:53:57 pm
content: Quote from: Brutte on May 25, 2016, 06:17:14 amDebuggers are not *that* expensive. E.g. AVR Dragon can be used to debug almost anything and works fine with Avarice (http://avarice.sourceforge.net/)/The new Atmel ICE is around 80EUR, that is not expensive, considering what it does. The older JTAGICE 2/3 works with Avarice too, but it is not made anymore.However, if the OP is working in Windows, then whether or not something has proprietary drivers likely doesn't matter for them.

author: Buriedcode
author_rank: Super Contributor
timestamp: May 25, 2016, 10:02:23 pm
content: I don't think I've programmed an AVR in a few years, mostly because I put bootloaders in all the devices I used for testing, and flashing was done for production. But I have a USBasp with firmware to emulate an AVR ISP MKII that works directly with AVRstudio. I don't see how that is any better - just as easy to use USBasp, but my point is, there are many *many* resources for making your own, especially since arduino pushed the ATmega88/168/328 higher in popularity.

author: richardman
author_rank: Frequent Contributor
timestamp: May 25, 2016, 10:52:13 pm
content: I would recommend an AVR Dragon. While it's many years old, it does support debugging and pretty cheap. Not $3 or $10 cheap, but still cheap. That debugging capability will come in handy eventually.

author: rx8pilot
author_rank: Super Contributor
timestamp: May 25, 2016, 10:56:45 pm
content: I thought the AtmelICE supports debug, could be wrong. Is that only for the family's above AVR?

author: richardman
author_rank: Frequent Contributor
timestamp: May 25, 2016, 11:31:38 pm
content: Atmel-ICE does support debugging, but I think the Dragon may still be cheaper? Anyway. the recommendation would be "the lowest cost pod that also supports debugging" is worth the extra $

author: alank2
author_rank: Super Contributor
timestamp: May 26, 2016, 12:30:45 am
content: The debugging has worked pretty well for me with the atmelice. There are *3* versions you can buy from $35 to $108 depending on how complete you want it. I made an adapter to convert its silly 50mil headers to standard 100mil ones:http://www.digikey.com/product-search/en/programmers-development-systems/in-circuit-programmers-emulators-and-debuggers/2621880?k=atmelice

author: westfw
author_rank: Super Contributor
timestamp: May 26, 2016, 07:28:55 am
content: QuoteThe "Atmel ICE Basic" (which comes with fewer cables/adaptors) is about $50 - pretty much exactly the same prices as the Dragon, but the Atmel ICE also talks to the ARM chips.

author: janoc
author_rank: Super Contributor
timestamp: May 26, 2016, 10:43:00 pm
content: Dragon supports parallel high voltage programming in a socket (put a ZIF socket on the board!) which Atmel ICE doesn't. It also works with open source tools - may or may not matter for the OP, but if using anything else than Windows it could be important. Atmel ICE is pretty much Windows/Atmel Studio only.So I would say it comes down to what is more useful for the poster. The tools are not completely equivalent, despite comparable price.

author: westfw
author_rank: Super Contributor
timestamp: May 26, 2016, 11:22:27 pm
content: Does dragon do HV Serial programming as well? That's one thing I especially miss (when using low pin-count chips.)

author: janoc
author_rank: Super Contributor
timestamp: May 27, 2016, 07:54:01 pm
content: Quote from: westfw on May 26, 2016, 11:22:27 pmYup, it does do HVSP.

author: rstofer
author_rank: Super Contributor
timestamp: May 30, 2016, 03:09:12 pm
content: A mailable program loader. Where have I seen that before? Oh, sure, on my Press Monitors...That's a pretty cool gadget. When I get back to AVRs, I'll need to pick one up.

author: macboy
author_rank: Super Contributor
timestamp: May 31, 2016, 01:10:53 pm
content: The MiniPro TL866A supports high voltage programming either ICSP or in the 40-pin ZIF socket. (The TL866CSdoes not have the ICSP header but this is a problem easily solved). It supports at least ATMega and ATTiny, but you will need to check if you other specific ones in mind. I do not suggest it is the best overall solution here but I mention it for the high voltage programming capability which has been noted as lacking in many other tools. The TL866 is an affordable universal programmer that supports many types of devices, I find it indispensable. It might be worth having in addition to another ICSP/debugger, especially if that can't do HV programming.

author: janoc
author_rank: Super Contributor
timestamp: June 03, 2016, 01:20:49 pm
content: Quote from: macboy on May 31, 2016, 01:10:53 pmYup. I use it more often than my Dragon, because having to wire up the jumpers for the DUT ZIF socket on the Dragon every time is a serious pain.Sadly the MiniPro SW is only for Windows. There is some OSS tool for it too, but it is not fully feature-equivalent, I believe. So if you have avrdude programming instructions (fuses etc), it can take a bit of futzing to translate it to the correct settings in the MiniPro sw.J.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: May 01, 2017, 11:12:26 am
content: Quote from: alank2 on May 26, 2016, 12:30:45 amAlan, did you publish your design anywhere? Alternatively, does anyone happen to know the spacing between the two connectors, I couldn't find this info in the Atmel ICE documentation.I published a KiCad version of the adapter board fromhttps://atoomnet.net/atmel-ice-header-adapter/on my githubhttps://github.com/bobc/Atmel-ICE-Header-Adapter

author: alank2
author_rank: Super Contributor
timestamp: May 01, 2017, 12:05:26 pm
content: Hi,Gerbers here:http://home.earthlink.net/~alank2/atmelice.zipThanks!Alan

author: coromonadalix
author_rank: Super Contributor
timestamp: May 14, 2017, 03:13:49 am
content: avrdudess with avrdude does a great job with an genuine Stk500, or Stk500 clone, or better with an Avr DragonI had an avr Dragon and made some small adapters boards for the headers configurations, and soldered and zif socket on it ...Now, almost all my needs are solved with an Elnec Beeprog programmer ...