Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is a good AVR programmer with debug & HV programming?

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
About the only inexpensive AVR programmer with debug is the AVR Dragon, I've got an AVR ATmega168 project put in my lap and although I have access to a JTAG ICE MK2 I would like to have access to one on the cheap.
My 2 cents, I've managed to avoid using the AVR microcontrollers till now, and now that's I've been using the ATmega168 it's not so bad but I find the the tools confusing, ie High Voltage programming, JTAG, ICP, Debugging. Aside from the $350 JTAG ICE (it's not a true ICD it's a debugger, but then so is the Microchip Real ICD)

Sadly a PIC would have been a better match for the project. (battery voltage detect & dual comparator with a programmable DAC)
 
blueroomelectronics said:
About the only inexpensive AVR programmer with debug is the AVR Dragon, I've got an AVR ATmega168 project put in my lap and although I have access to a JTAG ICE MK2 I would like to have access to one on the cheap.
My 2 cents, I've managed to avoid using the AVR microcontrollers till now, and now that's I've been using the ATmega168 it's not so bad but I find the the tools confusing, ie High Voltage programming, JTAG, ICP, Debugging. Aside from the $350 JTAG ICE (it's not a true ICD it's a debugger, but then so is the Microchip Real ICD)
Go for the Dragon. It's very good. Does everything the PICkit2/Junebug does and then some. Aside from a few differences in terminology, and much simpler, clearer AVR architecture and asm code (comparing with 16F's), AVRs and PICs are much alike. You'll pick it up easily.
 
blueroomelectronics said:
Is the Dragon a HV programmer?
Yes. And can program/debug in every available mode there is for AVRs. It's an amazing tool for the price. AVR Studio is pretty comparable to MPLAB, and is free.
The AVR Dragon sets a new standard for low cost development tools.
AVR Dragon supports all programming modes for the AVR device family.
It also includes complete emulation support for devices with 32kB or less Flash memory.

Programming Interfaces
- In-System Programming
- High Voltage Serial Programming
- Parallel Programming
- JTAG Programming

Emulation Interfaces
- JTAG
- debugWIRE

The AVR Dragon is USB powered and is capable of sourcing an external target.
A prototype area allows simple programming and debugging.

The AVR Studio online-help contains a complete list of supported devices.
 
The Dragon is the only programmer I've ever owned/used, so nothing to compare with. For a complete beginner, it wasn't a huge hassle to figure out how to use. USB and $50, it's a good solid purchase. Yet to have a failure or glitch, been using it for over a year.

Few things you should know...
The Dragon comes stripped to a minimal, but usable out of the box. If you have cables and jumpers, which aren't included. No documentation included, you need to download AVR Studio from Atmel (free). I loaded the board, added some headers and a ZIF socket. Had to build my own cables and jumpers. There are a couple of threads about the Dragon here, one has a link to an online store with some nice jumpers, which from personal experience with tiny header pin sockets... is a good deal. There is something to do with a 32k limit, but I believe its only for the debug wire.

I've only used HV and ISP, only 5 different devices, but hasn't failed or destroyed any chips.
 
The debug mode on the PICs loads a small program in upper memory and reprograms the target chip with your code.

I'm using the clients tools (Studio 4 & ED an editor) does the debug mode on AVR automatically load new code when the debug is run (ED does not appear to integrate with Studio so it runs the build on its own)? Is the Studio editor any good? Is BASCOM any good, is GCC any good?
 
blueroomelectronics said:
I'm using the clients tools (Studio 4 & ED an editor) does the debug mode on AVR automatically load new code when the debug is run (ED does not appear to integrate with Studio so it runs the build on its own)? Is the Studio editor any good? Is BASCOM any good, is GCC any good?
AVR Studio's editor is fine. I played with BASCOM a bit. Seems like a decent BASIC. GCC has always been very good, tho a bit cryptic (the PIC's ASM30 and the linker is GCC - probably C30 is too - I'm not sure about that).
EDIT: Yup, C30 and its entire toolchain is GCC. Nice free software from the Linux world.

does the debug mode on AVR automatically load new code when the debug is run
I never played with the debugger when I was programming AVRs, but I'd bet they work in very similar ways to what you're used to.
 
Last edited:
Hey Bill! If you're doing AVRs, be very very careful of how you set the fusebits (and don't touch lockbits unless you really need to). Read the datasheet and be SURE you know what you're doing before changing them. Change one wrong and often you might as well chuck the chip. There are ways to rewrite them, but sometimes it's just not worth it.

Today I was playing with my **broken link removed** and foolishly played with fusebits without carefully considering what I was doing. I hadn't touched an AVR in a long time and kinda forgot how bad it can be if you do it wrong. Bingo! Instant unprogrammable Staver! :D With it being on that DIP board it's almost impossible to save. I may yet fix it by wiring it up for HV programming, but for now it's junk.
 
Last edited:
blueroomelectronics said:
Won't an HV programmer be able to erase them? I assume the Dragon is HV.
Yes, but I'd have to build a custom cable to do it. I'll tackle that another day (month... year... :D ) HV needs different (more) connections than ISP, and wants to power the target itself.

I also remembered today why I never debugged an AVR before. It was because JTAG was expensive before the Dragon came along. AVRs debug with JTAG, not via the ISP cable. But you can program via the JTAG connection, so you still only need one cable connected.
 
Last edited:
blueroomelectronics said:
Ahh that help, so the HV programming needs the 10 pin cable.
Just in case you're thinking what I think you may be thinking (**broken link removed**)... JTAG is not HV. The Dragon has a 20-pin connector for HVSP (High Voltage Serial Programming) and also uses the same connector for HVPP (High Voltage Parallel Programming). It has that many pins so that connector can be used for HVPP as well. HVSP uses 7 pins of those 20.

What I'll end up doing is pulling the DIP board and putting it in a breadboard, then wiring HV to there however I can. I considered desoldering the chip and putting a new one on, but that's just about impossible without the right tools.

EDIT: Just ran across this over at avrfreaks
invest in a heat gun. It is going to save you so much trouble. It will desolder a mega48 so fast and easy. I use it all the time on some TQFP100 parts I use.

Does the debug bit have to be set in HV mode?
It has to be set to debug in JTAG. And you obviously can't set or clear that bit from a JTAG connection cuz the software doesn't allow you to saw off the branch you're sitting on. :D You gotta use ISP or other method to set it.
 
Last edited:
Oh, this just gets better and better. :p Atmega32 doesn't support HVSP. I have to connect all 20 pins and use HVPP. HVSP is only supported on the small chips.

And even better yet :( the Staver only brings out Ports A and D, so this thing cannot be saved with HVPP. The only cure is to either desolder and replace the chip or buy a new Staver module (Yeah right! :p Like that's gonna happen! :p Crazy Swedes want around $60 for the module (insane! :D), plus shipping from Sweden.).
 
Last edited:
I hadn't been to Ecros' site in a while. They have some new products. The Dragon Rider 500 looks pretty good. Only about $30. Nice add-on for a Dragon programmer.

I'm gonna get me one of those Butterfly carrier boards. Makes it so much easier to expand/experiment with. Only $20.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top