Yahoo Groups archive

AVR-Chat

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

Thread

Need help spinning up on AVRs

Need help spinning up on AVRs

2005-02-12 by paul_hvidston

Hi all,

I'm new to AVRs and I don't yet have a clear picture of the
programming requirements/options for these devices. First a bit about
me. I'm a consulting engineer and do hardware, software, just about
anything I can get paid for ;-). I'm just finishing up a contract
designing an ARM 7 core into an ASIC, I've used PICs in the past
(never really liked them) and would like to use the Atmel devices in
future projects (where appropriate). Hopefully some kind members can
help set me straight here. Here's a few starter questions.

1) From reading the chip documentation, it appears that the "fuse" and
"lock" bits can be erased/reprogrammed. Am I correct?

2) Some devices in the family require a parallel programming algorithm
in order to configure the fuse bits. For others, the fuse bits
can/must be programmed via a serial algorithm. Yes? What cheap
programmers to people recommend? Which ones can handle the fuse bits?
I've seen interesting offerings from Sparc Fun Electronics
(www.sparkfun.com). Any comments?

3) It looks like only some of the newer devices support JTAG? What is
the easiest/cheapest way to do in-circuit debugging? Are people using
gdb (or printfs and LEDs)?

4) The AT90S2313 appears to have been replaced by the ATtiny2313. Is
the new device available and sound, or is the old device the one to use?

Thanks for listening

Paul
California

Re: [AVR-Chat] Need help spinning up on AVRs

2005-02-12 by Russell Shaw

paul_hvidston wrote:
> 
> Hi all,
> 
> I'm new to AVRs and I don't yet have a clear picture of the
> programming requirements/options for these devices. First a bit about
> me. I'm a consulting engineer and do hardware, software, just about
> anything I can get paid for ;-). I'm just finishing up a contract
> designing an ARM 7 core into an ASIC, I've used PICs in the past
> (never really liked them) and would like to use the Atmel devices in
> future projects (where appropriate). Hopefully some kind members can
> help set me straight here. Here's a few starter questions.
> 
> 1) From reading the chip documentation, it appears that the "fuse" and
> "lock" bits can be erased/reprogrammed. Am I correct?

All fuse and lock bits can be set (programmed to zero) with any programming
method.

> 2) Some devices in the family require a parallel programming algorithm
> in order to configure the fuse bits. For others, the fuse bits
> can/must be programmed via a serial algorithm. Yes? What cheap
> programmers to people recommend? Which ones can handle the fuse bits?
> I've seen interesting offerings from Sparc Fun Electronics
> (www.sparkfun.com). Any comments?

While any fuse/lock bit can be easily programmed 0 (set), clearing
bits (set to 1) is trickier.

Lock bits can only be cleared with a chip erase. A chip erase will
not touch the fuse bits.

If you clear the SPIEN fuse bit, you'll be locked out of ISP programming.

If you clear the JTAGEN fuse bit, you'll be locked out of JTAG programming.

If you clear both those, the only way you can get back in is to use a
12V parallel programmer.

Some later devices have 12V serial programming that may overcome
some of these problems IIRC.

> 3) It looks like only some of the newer devices support JTAG? What is
> the easiest/cheapest way to do in-circuit debugging? Are people using
> gdb (or printfs and LEDs)?

JTAG needs 4 or more wires, but the newest debug-wire method programs
thru the reset line iirc (only on later devices).

Atmel JTAG ICE or a clone of it is cheapest/easiest way for in-circuit
debugging. AVR Studio is free and controls it.

Avarice is the usual way to get gdb to control the jtag ice.

I've made gdb control the jtag ice direct, but the patches aren't ready for release.

> 4) The AT90S2313 appears to have been replaced by the ATtiny2313. Is
> the new device available and sound, or is the old device the one to use?

Think the old one is discontinued.
Show quoted textHide quoted text
> Thanks for listening
> 
> Paul
> California

RE: [AVR-Chat] Need help spinning up on AVRs

2005-02-12 by wbounce

I am not expert I will try.

For a build it yourself programmer check out Brian Dean's avrdude page. 
http://www.bsdhome.com/avrdude/  
( I can not tell you how much Brian has been a help to me)

I had 1st gotten the Sparc Fun Electronics but could not get it to work.

Fuses can be programmed or changed. I think once you program it you can
only unprogram it by doing a chip erase.
AVRdude (the software) will allow you to work with the low,high, and
extend fuse interactively with the -t option. I had to reset these once
because somehow I whacked them.

As far as how I debug, I am using winavr 3.4.1 with avr studio 4.1. I
first use the dwarf-2 option to create a .elf file which I open in
avrstudio. Once I have walked the code to my satisfaction I then program
the board with it. I will connect to uart0 with a null modem cable and
use hyperterminal to view the output. I do have printfs in the code. And
I am also using leds. While connected to the uart0 I have to put my
robot up on blocks. Once  I do all that I will disconnect the comms and
then run it free.

As far as JTAG and AT90S2313 that would be beyond me
Show quoted textHide quoted text
-----Original Message-----
From: paul_hvidston [mailto:paul@acksysengineering.com] 
Sent: Saturday, February 12, 2005 12:07 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Need help spinning up on AVRs




Hi all,

I'm new to AVRs and I don't yet have a clear picture of the programming
requirements/options for these devices. First a bit about me. I'm a
consulting engineer and do hardware, software, just about anything I can
get paid for ;-). I'm just finishing up a contract designing an ARM 7
core into an ASIC, I've used PICs in the past (never really liked them)
and would like to use the Atmel devices in future projects (where
appropriate). Hopefully some kind members can help set me straight here.
Here's a few starter questions.

1) From reading the chip documentation, it appears that the "fuse" and
"lock" bits can be erased/reprogrammed. Am I correct?

2) Some devices in the family require a parallel programming algorithm
in order to configure the fuse bits. For others, the fuse bits can/must
be programmed via a serial algorithm. Yes? What cheap programmers to
people recommend? Which ones can handle the fuse bits? I've seen
interesting offerings from Sparc Fun Electronics (www.sparkfun.com). Any
comments?

3) It looks like only some of the newer devices support JTAG? What is
the easiest/cheapest way to do in-circuit debugging? Are people using
gdb (or printfs and LEDs)?

4) The AT90S2313 appears to have been replaced by the ATtiny2313. Is the
new device available and sound, or is the old device the one to use?

Thanks for listening

Paul
California





 
Yahoo! Groups Links

Re: [AVR-Chat] Need help spinning up on AVRs

2005-02-12 by Leon Heller

----- Original Message -----
From: John Samperi
To: AVR-Chat@yahoogroups.com
Sent: Saturday, February 12, 2005 10:31 PM
Subject: RE: [AVR-Chat] Need help spinning up on AVRs


At 05:35 AM 13/02/2005, you wrote:

>3) It looks like only some of the newer devices support JTAG? What is
>the easiest/cheapest way to do in-circuit debugging? Are people using
>gdb (or printfs and LEDs)?

JTAG is available only in devices with at least 16K of flash.
The newer Tiny device and small megas (i.e. M88) with less
than 16k have the debug wire.

Programmer: You can just get started with a parallel port mode
porogrammer, only 4 resistors. I'm currenlty still using a
AVR910 type programmer which can be driven from Studio or other
packages. Bootloaders are great once you program the bootcode
into your chip.

I use the SP12 programmer which only has two resistors. 8-)
Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller

RE: [AVR-Chat] Need help spinning up on AVRs

2005-02-12 by John Samperi

At 05:35 AM 13/02/2005, you wrote:

>3) It looks like only some of the newer devices support JTAG? What is
>the easiest/cheapest way to do in-circuit debugging? Are people using
>gdb (or printfs and LEDs)?

JTAG is available only in devices with at least 16K of flash.
The newer Tiny device and small megas (i.e. M88) with less
than 16k have the debug wire.

Programmer: You can just get started with a parallel port mode
porogrammer, only 4 resistors. I'm currenlty still using a
AVR910 type programmer which can be driven from Studio or other
packages. Bootloaders are great once you program the bootcode
into your chip.

Debugging: I still use the old ICE200, which is a real in circuit
emulator. Unfortunately all of the devices supported are now
obsolete ...BUT.. it can debug 90s8535, 90s8515, 90s2313 and others.
Most of the chips have direct replacements so you can develop your
code on it and then use one of the newer chips. You would not be able
to use newer instructions or things like TWI or the advanced features
of the USARTS. May be able to pick one up for a few dollars or even free.
I got my second unit for nothing from the Atmel FAE as I blew up one
input in mine and they weren't using theirs anymore :-))



Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

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.