Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: ATMega16 JTAGEN fuse

2004-10-28 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "Chuck Hackett" <egroupscdh@W...> 
wrote:

> ...  The ATMega16 I was using was
> fresh from Digikey but ... I may
> have cleared the fuse.

This is worth getting straight because if Atmel don't program the 
fuse it means you can't have a JTAG-only development setup. You'd 
need ISP as well just to program that fuse before you can get into 
the chip with JTAG. This would be a shame. I can't think of anything 
you'd need ISP for if you had JTAG. This, of course, only applies if 
you've taken the decision to go JTAG, which is not right for everyone.

I looked at the data sheets for the ATmega16, ATmega32, ATmega169, 
ATmega64 and AT90CAN128. In all of them, the 'default' state of the 
JTAGEN fuse is zero (programmed) which enables the JTAG interface. I 
am assuming that 'default' means the state in which the fuse is when 
the part is shipped from the factory.

I also fired up some AVR ICE-Cubes that are assembled but not yet 
loaded with software. The JTAGEN fuse was already programmed.

I have some ATmega64s, ATmega128s and AT90CAN128s, but they look so 
peaceful and comfortable in their little conductive plastic trays 
with the clear lid on top that I didn't have the heart to rip them 
out. I would do it if there is real concern about the correctness of 
the data sheets.

> ... if the fuse is enabled from
> the factory doesn't this mean that
> the JTAG lines on the PORTC are
> unavailable until you clear it?

Yes, or you could disable the JTAG interface in your software by 
setting a bit the name of which escapes me for the moment (JTD?). 
That method gives you some ability to reclaim the four JTAG pins for 
your application but still use JTAG for on-chip debug. Clearing the 
fuse is not a great inconvenience as you're almost certain to be in 
there fiddling with the clock fuses anyway.

> ... that would mean that you
> couldn't use the JTAG to program
> the chip as received from the
> factory.

Until you'd programmed the fuse with ISP, right. This is no problem 
if you have ISP, but it would be nice to know you don't need it if 
you have JTAG.

Conclusion - evidence points to my assertion that the JTAGEN fuse is 
programmed at the factory being correct. A JTAG OCD interface will 
work with devices as Atmel deliver them. You don't need ISP as well.

Graham.

P.S. Isn't there anyone from Atmel here? The Z8 Encore! group is 
erratically visited by ZiLOG people, though I should say that the 
answers they give are more often wrong than right.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.