Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

AVR Dragon
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AVR Dragon

by Atwolff on Sat Nov 20, 2010 12:23 pm

Anyone here have experience with the AVR Dragon?
I want to buy it. I've been into electronics for a few months now but I really want to get into AVR.

Any suggestions/warnings/flames are appreciated. :D
Atwolff
 
Posts: 2
Joined: Sat Nov 20, 2010 12:16 pm

Re: AVR Dragon

by Atwolff on Sat Nov 20, 2010 12:25 pm

I guess since I want to get into programming, I could start with the arduino uno?
Atwolff
 
Posts: 2
Joined: Sat Nov 20, 2010 12:16 pm

Re: AVR Dragon

by westfw on Sat Nov 20, 2010 1:51 pm

I have heard that the Dragon is a bit "fragile" and somewhat incomplete (ie no sockets for targets.)
An Arduino of some kind is probably a better choice as a first microcontroller experience.
(The Dragon does support more advanced debugging capabilities than are available on Arduino, however...)

westfw
 
Posts: 1717
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: AVR Dragon

by chatham on Sat Nov 20, 2010 4:20 pm

So, I've got a Dragon, an AVR-ISP mkII, and a few Arduinos, and here's my thoughts:

Arduino - great, simple, good for basic prototyping. If I had to do it again, I'd probably get one of those proto-shields for it too, since in my experience, with regular use, the pin sockets on it kinda get loose, and the non-standard spacing between the rows of digital pins is like, WTF. At any rate, I still use it a ton for first prototyping, mostly because I'm too lazy to really figure out how to use the AVR USART on my own, and the USB bootloading makes things super-simple. On the other hand, there are a few limitations - 1, you don't have access to a couple features, like the watchdog timer. 2, the Arduino IDE isn't very good for intermediate/advanced programming (you can use other editors, though), but a lot of things like libraries kinda assume that Arduino IDE toolchain, so doing things in a separate editor is at least one additional step to set up. I haven't done it myself, so discount this point accordingly. 3, and this is the big one - Arduino can't mess around with it's own fuses. Which, considering that messing around with fuses is the best, most surefire way to brick your chip, is probably a good thing for the user base. Still, it prevents you from doing a lot.

AVR-ISP mkII - I use this the most when I'm not doing a specifically Arduino project. Why? It's fast. For whatever reason, this guy will do ISP programming like 5 times faster than a Dragon, and since my workflow involves a lot of re-flashing, it's just a nice thing. It integrates really well with AVR Studio, which is my preferred IDE for AVR programming. It's also cheap, and it can program fuses (which AVR Studio makes really simple and straightforward, and also warns you if you're about to potentially brick your chip). On the cons side, 1, it doesn't do high-voltage programming, so if you do mess up the fuses (disable the reset fuse, or set the oscillator value to a signal you can't generate), you can't rescue your chip. 2, no on-chip debugging. 3, you'll need to figure out some sort of mount/breadboard, since it just comes with a 6 pin ISP header.

AVR Dragon - I use this more for debugging than programming, due to the aforementioned slowness. Not that it's super slow, but it's noticeable if you own both, and so I might as well use the faster one if I don't need to do on-chip debugging. It supports on-chip debugging (through AVR Studio), so if you've got the modicum of computer science knowledge to take advantage of stepping through a program in real time and reading the registers, it's super useful. There are a couple of project I wouldn't have been able to do without on-chip debugging, but they're more advanced projects. The Dragon also supports High Voltage programming, so you can rescue chips where you messed up the fuses. It also has both pins for attaching a cable (6 or 10 pin) for ISP programming, and a space where you can install your own sockets for easy programming of chips. In terms of an introductory full-scale programmer, I've been pretty happy with it.

So I think I would personally recommend, if you haven't had any microprocessor experience before, get the Arduino first. If you want to start to get into stand-alone chips, or different AVR chips, you can actually use the Arduino as a functional ISP programmer, although I don't think the toolchain to use it is the most user-friendly. But if you do start to hit the limits of Arduino/develop an interest in programming independent chips, pick up an AVR-ISP mkII or a Dragon.
OpenChord.org - Open Source kits to let you play Guitar Hero with a real guitar, or build your own Wii/PS3/USB controllers.

chatham
 
Posts: 144
Joined: Thu Feb 04, 2010 2:30 am

Re: AVR Dragon

by Entropy on Mon Nov 22, 2010 12:22 pm

One thing Alan missed is that there is nothing preventing you from using an ISP programmer with an Arduino to treat it as a standard AVR development board.

I do nearly all of my prototyping with an Adafruit Boarduino and a USBTinyISP.

Well, I did. I eventually sprang for an Atmel JTAGICE MkII (replacing the USBTinyISP) to get debugWire capability, but most people are fine without DW.
Entropy
 
Posts: 472
Joined: Tue Jan 08, 2008 12:43 am
Location: Owego, NY USA

Re: AVR Dragon

by tinsmith on Mon Nov 22, 2010 1:59 pm

Have you seen a good write-up anywhere on what is supported through the Arduino programming environment vs. what needs to be done through ISP anywhere? Or, in your experience, what types of situations motivate you to transition from one to the other?
tinsmith
 
Posts: 62
Joined: Thu Nov 18, 2010 9:18 pm

Re: AVR Dragon

by chatham on Mon Nov 22, 2010 8:53 pm

I think the proper 'time to switch' is probably pretty personally-specific, and probably more suited to how you program and how much you build, rather than what specific tasks you do.

More or less, you can probably do a huge amount of the projects you want to do with an Arduino. It's at a really good place in terms of flexibility - you've got almost all the features of the underlying chip at your disposal (the only hardware on the chip I know of that you can't use is the watchdog reset), it's clocked fast enough (16MHz) that it's very rarely going to be a limiting factor, and it's really easy and friendly to debug and prototype with. If your programming style starts to get more advanced, you can write standard C programs in the Arduino IDE and have things work just fine.

In my mind, these are the reasons you'd need to switch to using a dedicated programmer:
1 - You use a lot of microcontrollers. The ATmega328 is $3, vs. $30 for an Arduino. If you're going to do a project only every month or two, or if you're going to reuse the parts from your old projects, buying multiple Arduinos can make sense in terms of the time savings. Or save even more money, and get the Adafruit Boardinos, and use those. But if you're going to start using a couple of MCU's a month, $20-30 a pop starts to add up.

2 - You want a smaller or bigger chip. You can, of course, get an Arduino Mega if you need to go bigger, but you're still limited to 2 chipsets with Arduino. There's a lot of cool low-powered stuff you can do with ATtinys, and other AVR chips have more ports and more dedicated on-chip hardware to take care of communication and stuff. Or if you want to run your system at 3v3 (or even 1.8V), you're going to need to go with a separate chip.

3 - Your coding gets more advanced. I don't think Arduino plays nicely with AVR Assembly language, and even if you don't want to mess around with writing your own jmp instructions, you might run into libraries you want to use which do. Of course, it is possible to write your code in a separate development environment and upload the hex file to the Arduino via other programs, but you start to lose out on the ability to use the Arduino libraries easily. So if you're going to start getting down and dirty in the world of straight AVR programming, that might be a good point to start programming over different interfaces.

4 - You need a different clock speed, or mess with the chip's fuses for some other reason. This is probably a fairly rare case - as I said, the Arduino is set at a really flexible setting. Still, if you want to go low-powered, you're going to need to have a lower clock speed. There are other reasons out there for using specific crystals (maybe you need super-tight timing for serial communication?), too, and if you run into that situation, there's nothing you can really do with an Arduino to change that.

Hope it helps!
OpenChord.org - Open Source kits to let you play Guitar Hero with a real guitar, or build your own Wii/PS3/USB controllers.

chatham
 
Posts: 144
Joined: Thu Feb 04, 2010 2:30 am

Re: AVR Dragon

by tinsmith on Mon Nov 22, 2010 9:12 pm

Yeah, that does. Thanks.

Specifically for low power, I'd tend to switch to an MSP430. I haven't evaluated exactly where ATTinys fit against that, my motivation is about half that I know it's a no-thought solution and half that I know people who use it frequently.
tinsmith
 
Posts: 62
Joined: Thu Nov 18, 2010 9:18 pm

Re: AVR Dragon

by stinkbutt on Tue Nov 23, 2010 2:34 am

I've never used more than a breadboard, a USBTiny, avr-gcc, and avrdude. I've never really encountered a situation that called for more, but I'm hardly an expert.
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: AVR Dragon

by Entropy on Tue Nov 23, 2010 11:54 am

I initially learned AVR programming before Arduino ever existed, so I just skipped the Arduino IDE and went straight to straight avr-gcc.

Most of the small MSP430s seem to be unobtainium compared to many ATTinys, such as the ATTinyX5 series.
Entropy
 
Posts: 472
Joined: Tue Jan 08, 2008 12:43 am
Location: Owego, NY USA

Please be positive and constructive with your questions and comments.