DebugWire Issue - ATMega48 w/ ext. osc.

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

I'm using the DebugWire interface for the first time. The chip at hand is the ATMega48 and I'm using the Dragon as my interface.

I got everything working great, including the Debugwire, but then I added an 8mhz ext. crystal. As soon as I did this the DebugWire interace quit working. The circuit still worked fine, so I know the settings and crystal are good.

I then removed the crystal, set the fuses back to the int. osc. but this didn't help, the DebugWire interface still doesn't work.

I then replaced the chip with a new Mege48 and everything worked fine with the int. osc. I added the ext. osc., changed my fuses and now I'm stuck with with another chip that I can't use the DebugWire interface on!

Anyone have any ideas?

--------------------------------
Kevin Pierson

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

do you have dW enable fuse set?

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

Yes, AVR Studio automatically sets the fuse when going in to Debug mode. Once the fuse is set, I get an error message saying that DebugWire can't be entered and to check the reset line (there is nothing on the reset line except for the dragon reset line). I then go back to ISP mode and have to clear the debug fuse before the chip will work again.

--------------------------------
Kevin Pierson

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

what do you have on your reset line? just a pullup resistor? how big is it? do you have a capacitor on the reset line?

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

I have nothing on the reset line at all - just a direct connection to the Dragon ISP reset.

When I'm not using the dW I throw a jumper to 5vdc on the reset line.

--------------------------------
Kevin Pierson

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

Quote:
I throw a jumper to 5vdc on the reset line.
WHY?? The reset line has a weak internal pull up, if you want some improvements just add the recomended ext pullup of 4K7 to 10K. If you forget to remove the short you could kill the Dragon, it's very delicate even sissy.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I have done most of the prototyping with the Dragon connected. The only time I removed the Dragon was to make sure that the external crystal was working correctly. I'm pretty sure that the reset line doesn't have anything to do with the DebugWire issue!

--------------------------------
Kevin Pierson

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

Let me ask a different question -

Has anyone successfully used the dW interface with an external crystal?

As I said above, I've never used it before now so I have virtually no experiance with it.

--------------------------------
Kevin Pierson

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

Quote:
Has anyone successfully used the dW interface with an external crystal?
I use a mega88/168 on the stk500 with the Dragon connected (and using an external crystal). So yes, it works. I did have trouble once when I seemed to be stuck between isp and debugwire (couldn't make either work), so I just used the parallel on the stk500 to get me back to 'square 1'. When it switches you to debugwire, it asks to recycle the target power (or something), and that's when I can have problems if I don't recycle power on the stk500 before I click ok (something like that).

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

Quote:
Has anyone successfully used the dW interface with an external crystal?
From 8 MHz to 18MHz for the past 18 month with T2313 and the M48 etc family, untill IT blew up (wasn't my fault...)
So I'm waiting for a good Samaritan (or is it Bellingham-ian) to send me another plus I'll get a couple of dead chips replaced and this one should also be working fully again.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly