Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 8th March 2008, 07:11 PM   (permalink)
Default What is a good AVR programmer with debug & HV programming?

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)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 8th March 2008, 09:36 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 8th March 2008, 09:42 PM   (permalink)
Default

Is the Dragon a HV programmer?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 8th March 2008, 09:46 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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.
Quote:
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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 8th March 2008, 09:52 PM   (permalink)
Default

I'll order a Dragon then, thanks Futz.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 8th March 2008, 10:36 PM   (permalink)
Default

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.
HarveyH42 is offline  
Old 8th March 2008, 10:56 PM   (permalink)
Default

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?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 8th March 2008, 11:20 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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.

Quote:
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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 11th March 2008 at 05:13 AM.
futz is offline  
Old 9th March 2008, 01:08 AM   (permalink)
Default

Here's a nice little movie of the AVR Studio/Dragon debugging an ATTINY861.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 10th March 2008, 05:04 AM   (permalink)
Default

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 Staver 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! 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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 10th March 2008 at 05:25 AM.
futz is offline  
Old 10th March 2008, 05:21 AM   (permalink)
Default

Won't an HV programmer be able to erase them? I assume the Dragon is HV.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 10th March 2008, 05:28 AM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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... ) 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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 10th March 2008 at 05:38 AM.
futz is offline  
Old 10th March 2008, 05:43 AM   (permalink)
Default

Ahh that help, so the HV programming needs the 10 pin cable.
Does the debug bit have to be set in HV mode?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 10th March 2008, 05:50 AM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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 (are you pondering what I'm pondering?)... 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
Quote:
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.
Quote:
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. You gotta use ISP or other method to set it.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 10th March 2008 at 07:21 AM.
futz is offline  
Old 10th March 2008, 06:02 AM   (permalink)
Default

Just thought id drop in and show you this even tho you might have sen it or it might not be needed but bored:

http://www.instructables.com/id/Help...-8-Bit-AVR-Pr/
AtomSoft is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
good PIC programmer? gimmix Micro Controllers 21 1st April 2005 10:25 AM
PIC Programmer through COM and ICSP (JDM ??) test1 Micro Controllers 6 12th October 2004 09:06 AM
Is this a good PIC programmer? mattg2k4 Micro Controllers 14 1st June 2004 07:18 PM
any good websites for low level programming ideas??? janenaive General Electronics Chat 1 15th February 2004 12:02 PM
learning emmbedded C programming ashraf Micro Controllers 0 24th July 2003 06:15 AM



All times are GMT. The time now is 11:44 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker