On Chip Debugging AvrStudio 4 STK500

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

Hi All,
I have an mega8535 that I'm using on the STK500 and I would like to do on chip debugging. I've been using AVR Studio 4. What options, with little to no additional hardware, do I have for on-chip debugging? My application requires that spare rsr232 port too, but I can debug that seperately if need to be.

Thanks,
Jason

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

As I recall, not much, although I don't use AVR Studio for debugging. For on-chip debugging, a JTAG is really what you need. It won't occupy the board's ports, either. I just saw a few posts back, that you can make or buy one for little money. I can't do without one.

Cheers

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

If it's not to late to change your design, I would recommend that you replace your 8515 with a MEGA16. It has twice the flash, twice the ram, more timers and A/D. It also has a JTAG interface for debugging AND is cheaper ! :D

What more could you ask for ?

Here is a link to an inexpensive JTAG dongle from Olimex ($39.95 US).

http://www.olimex.com/dev/index.html

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

gahelton wrote:
If it's not to late to change your design, I would recommend that you replace your 8515 with a MEGA16. It has twice the flash, twice the ram, more timers and A/D. It also has a JTAG interface for debugging AND is cheaper ! :D

He's using a mega8535 (not 8515), which is about 90 cents cheaper than the mega16 at Digikey. The 90S8535 is more expensive than both of these though. AFAIK, both the mega8535 and mega16 use the same silicon process, and the 90S series used a larger process.

I agree that you should move to a mega16 if you have the desire to use on-chip debugging. You don't even need to commit to a mega16 for production.. migrating down to the mega8535 should require very little (if any) effort. Just keep in mind that you plan to use the mega8535 while you write the code.

/* John Butera */

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

Hmm ... that's a good idea to use the mega16 for its JTAG support and then switch back to my current chip. Where else can I get a cheap JTAG dongle? I got burned by Olimex a couple of months ago. I had placed around a $100 order for some boards to be made. Did an excellent job, and then he just kept charging money to my card! $98 here $67 there, $200 here and about $450 later my bank suggested that I just change my CC number. Was so nice in the begining with emails, won't reply now. Odd. Can I make a JTAG adapter?

Thanks,
Jason

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

Remember that the 8535 has ADC on board and the 8515 DOES NOT! So if you are using the 8535 because of the ADC you will need a chip with ADC. (Does the M16 have ADC?)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
Remember that the 8535 has ADC on board and the 8515 DOES NOT! So if you are using the 8535 because of the ADC you will need a chip with ADC. (Does the M16 have ADC?)

The mega16 is an analog part with the same pinout as the mega/8535. The mega162 would be the corresponding 16kb/JTAG upgrade for the mega/8515, but AFAICT, the subject of 8515's was brought up erroneously.

/* John Butera */

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

Quote:
Can I make a JTAG adapter?

Sure you can!
Try this one: http://www.siwawi.arubi.uni-kl.d...
Or build this (as I did): http://avr.openchip.org/bootice/
It's really simple, almost just an Avr...

/Alex

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

alah4637 wrote:
Quote:
Can I make a JTAG adapter?

Sure you can!
Try this one: http://www.siwawi.arubi.uni-kl.d...
Or build this (as I did): http://avr.openchip.org/bootice/
It's really simple, almost just an Avr...

/Alex

Hi Alex,
I like that first one; I could probably use through hole components and build it on perf board. It says on the page that it doesn't support debugWIRE. Isn't this what I need for my on chip debugging?

Thanks!
Jason

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

Jason,

You don't need DebugWire for debugging the MEGA16 (or any other device with a full JTAG interface). DebugWire is a new single wire system for debugging some of the newer devices like MEGA48,MEGA88,MEGA168, etc. DebugWire is included in the new JTAGICE mkII tool from Atmel. This tool has both JTAG and DebugWire.

No information is available yet on the DebugWire protocol so it might be a while before you can include it in your own debugger.