Which AVR programmer would best fit my use case as described?

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello and thank you for trying to help.

  I have experience (limited) with the old AVR Dragon debugging tool, I dropped out of embedded coding for a while but the bug has bitten me again... I am a hobbyist electronics kind of guy with an automation focus. I have been writing code for years at the PC/Mobile level including C/C++, Python, VB all the usual suspects. I have used the Arduino platform enough to know there are some real limitations if you need real world timing to be really accurate, among other things. Please don't flame me for that I love arduino for it's intended purpose however I am that guy that actually tries to understand the equivalent circuit diagrams on data sheets for 74xx series chips. I think you need to really get an understanding of the underlying technology to be able to use it properly.  

 

  Ok enough history. My intent is to use microcontrollers in various projects involving both home and industrial automation. I am employed at a steel fabrication shop and have the go ahead to do what I can to speed up production. I also have a burning need to automate my lawn mower, coffee pot, AC, yeah you get the picture. (<- AC mains will kill the you this is just a flippant comment.)

 

  I have been researching ISP programmers for AVR chips and there are a couple of new products I am not familiar with. My working budget is around $200 to $300 for a programmer. At my level I cannot justify the AVR one kit at $600.00 or the other one "Real" ICE for MPLab. That leaves the STK600 and the Atmel ICE full kit. I have scanned the Starter Kit for the STK600 and the users guide for the Atmel-ICE and I can't nail down the benefit of the STK600. Both products seem to do about the same thing if you disregard the convenience of having sockets for SMD chips with the STK600. The STK600 seems to have two other pcbs required to interface with any particular chip footprint / pinout. Also I assume unbricking a chip with incorrectly set SPIEN, RSTDISBL, or DWEN register still requires high voltage programming? 

 

TLDR; Is there any benefit in shelling out the extra bucks for a STK600 and all it's bit or should I just grab an ICE full kit and go with that?  

 

Thank you in advance for any advise. 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just get Atmel-ICE if you want to debug. If you really just want to program and not debug get a $2 USBAsp from eBay.

 

STK600 had it's day but if you just want a board to prototype stuff these days everyone would probably just choose a $5 Arduino (nothing about the (excellent) hardware says you are tied to using the Arduino software if you don't want to, you can avrdude the output of ANY build system into it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the advise clawson. I have one on order now from Mouser. I assume I can just use my oscilloscope and not worry about getting the power debugger?  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You say you just want to program AVR's and have a Dragon. Why would you want another programmer?

As Clawson says. the USBasp is sufficient for "only programming". It does however only do programming over ISP, no debug wire, jtag, or any other of the other newer protocols.

I also have a bunch of USBaps's. (Every now and then I let the smoke escape when I do something stupid)  I like them because of their small form factor & low price.

The hobby market has somwhat settled on the atmega328. It's cheap enough to not worry about it's price, just buy them in batches of 10 or so, and it has enough peripherals and capacity (32k Flash) so you won't run out of storage too soon, and there are plenty of "arduino" clone boards with this processor. Any "arduino" board can be used without the "arduino" framework. Most even have the 6-pin connector layout for use with any regular ISP programmer.

If you want to buy some of the < USD 2 boards below, buy from at least 2 different shops. It is rare that a shipment does not arrive, but every now and then it does happen.

https://www.aliexpress.com/wholesale?SearchText=arduino+atmega328

 

Last February there was a 50% discount ( USD 100 -> USD 50) for the Atmel ICE on the Microchip website.

After Microchip bought Atmel they seem to want to merge the toolchains. I believe mplab also supports (some?) AVR processors now.

I suspect they want to do something similar with the programmers, and the discount was because they wanted to get rid of old stock before putting something new on the market.

 

(Oops, forgot to post).

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Paul,

  When I was using the dragon a few years ago, I was having some issues with intermittent upload failures. So instead of trying to crawl into trouble shooting an older product I decided to get something newer <-- read Daddy needed a new toy. I do get the differentiation with programming vs programming with debugging, and I can honestly say I have never written a piece of code more complicated than blink that didn't require a second pass or many passes. With that said perhaps I am misunderstanding the concept of debugging with microcontrollers? My intent is to be able to place breakpoints and step through code in the micro. <- Perhaps my ignorance is shining here? I only used the Dragon as an overpriced ISP device before real life halted my hobby. Also I assume the specific application would affect the micros ability to code step? For example time sensitive code with peripherals. I have plenty of experience with Visual Studio but NOT with Visual Studio connected to AVR chips.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to be able to set breakpoints and step through your code on an AVR you need something like the latest Atmel-ICE. ( <= "In Circuit Emulator").

However, at the moment your AVR hits a breakpoint and stops, then all timing dependent stuff wil get thrown out of the window immediately.

 

For my (also hobby level) AVR stuff I use a combination of different techniques.

General programs (For example a Circular buffer, special string formatting routines) I write & debug on my main PC, with output to standard IO ( i.e. terminal window). There I can use breakpoints and single line stepping all I want.

 

For low level timing sensitive debugging I use a Logic Analyser and techniques such as described in the link below. Timing inpact is pretty minimal, and the synchronous lineup of what your hardware actually does in combination with the debug output is a very convenient way to find bugs. The enourmous zoom factor of the Logic Analyser Software (Sigrok) is also a big help in finding bugs. In the (very simple) example I gave you can easisly see how the interrupt code lines up with data send out of a uart.

https://www.avrfreaks.net/forum/led-indicator-software-debugging?skey=debugging%20leds

 

With the combination of these two I did not realy feel a need for an Atmel-ICE, and because the thing is ill supported on Linux I didn't even bother to buy one.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com