Yahoo Groups archive

AVR-Chat

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

Thread

start AVR

start AVR

2004-03-26 by ydexter

Hello,

I saw that many people likes AVR (and they say AVR is more nice built
than a PIC). I want to start with them, but I really need some help.
What should be my starting AVR model?

After that I can find docs and a programmer to the web.

thanks

Re: [AVR-Chat] start AVR

2004-03-26 by David VanHorn

At 03:55 PM 3/26/2004 +0000, ydexter wrote:

>Hello,
>
>I saw that many people likes AVR (and they say AVR is more nice built
>than a PIC). I want to start with them, but I really need some help.
>What should be my starting AVR model?

My favorite intro chip is the 2343. Not much in there, but that's the point.
Not too much to get confused over. Using the internal R/C oscillator eliminates the need for external oscillator parts. 

I did an emulation of a popular $300 commercial light bar, and a full featured barcode decoder in this chip.

RE: [AVR-Chat] start AVR

2004-03-26 by LightYearCS

Yup, AVR rocks :)  Check out www.avrfreaks.com

Another processor I think may be way cool is the Texas Instruments
MPS430.  I don't know yet but I heard good things.

MPS430 day is on April 30th (4/30 get it?)

Sign up for the two hour seminar and get a MPS430 watch for free.  I
dunno what the watch does but it looks like there's an interface on it
:)

http://www.ti.com/corp/docs/landing/msp430day/index.htm

Barry
Show quoted textHide quoted text
-----Original Message-----
From: ydexter [mailto:ydexter@yahoo.com] 
Sent: Friday, March 26, 2004 7:56 AM
Subject: [AVR-Chat] start AVR

Hello,

I saw that many people likes AVR (and they say AVR is more nice built
than a PIC). I want to start with them, but I really need some help.
What should be my starting AVR model?

After that I can find docs and a programmer to the web.

thanks

 
Yahoo! Groups Links

Re: start AVR

2004-03-26 by Phil

One thing that I wish there was (could be I just haven't found it) is 
a Minimum AVR page.  It would have the minimum circuit needed to get 
going plus a description of the simplest programming and development 
envt.  The info is all there it just takes work to find it as you 
have to wade through a lot of unfamiliar jargon and try to figure out 
what is relevant and what isn't.  Its good for fast track learning 
but some people would feel overwhelmed.

I did find an AVR app note that gave me a bunch of the info I needed 
but it recommended a much more complex oscillator/reset circuit than 
it appears people actually use.   

I know a lot of people will say "buy a trainer". But my trainer 
boards all wind up being unused after an initial learning phase.  I'd 
just rather put a circuit together on a breadboard and be able to add 
or subtract to my heart's content.  Proto boards come closer but dont 
meet my personal needs.  Also, the trainers/protos dont make it easy 
to try different chips in the product family.

--- In AVR-Chat@yahoogroups.com, "ydexter" <ydexter@y...> wrote:
> Hello,
> 
> I saw that many people likes AVR (and they say AVR is more nice 
built
Show quoted textHide quoted text
> than a PIC). I want to start with them, but I really need some help.
> What should be my starting AVR model?
> 
> After that I can find docs and a programmer to the web.
> 
> thanks

Re: [AVR-Chat] Re: start AVR

2004-03-26 by David VanHorn

At 08:05 PM 3/26/2004 +0000, Phil wrote:

>One thing that I wish there was (could be I just haven't found it) is 
>a Minimum AVR page.  It would have the minimum circuit needed to get 
>going plus a description of the simplest programming and development 
>envt.  

That's why I like the 2343 for this. 
Just feed it 5V, and you're there.

The BA1FB programmer is what I use, I built up a little card with Radio shack parts, and two 8 pin sockets, one is program, the other is run. 


>I know a lot of people will say "buy a trainer". But my trainer 
>boards all wind up being unused after an initial learning phase.  

Like all training wheels, still..
The STK-500 isn't bad if you can get past the initial appearance of complexity. 
Show quoted textHide quoted text
>I'd 
>just rather put a circuit together on a breadboard and be able to add 
>or subtract to my heart's content.  Proto boards come closer but dont 
>meet my personal needs.  Also, the trainers/protos dont make it easy 
>to try different chips in the product family.

RE: [AVR-Chat] Re: start AVR

2004-03-26 by Larry Barello

Try:
http://homepage.sunrise.ch/mysunrise/pfleury/avr-starterkit.html

With the new mega parts all you need is the chip and a +5v supply.  Peter's
page, above, is pretty old.  You can dispense with the reset chip and you
can use something like the "SAMPLE" programmer and the programmer that comes
with WinAVR (www.avrfreaks.net) or BASCOM basic compiler (www.mcselec.com)
The "SAMPLE" programmer is literally four wires from a cut-off LPT cable
wired to the appropriate pins of the CPU.

Look at the schematic at the end of the ARC 1.1 users guide at
www.barello.net/ARC for the SAMPLE programmer.  Otherwise find it in the
BASCOM help file and a few other obscure places...
Couldn't get much simpler/cheaper.

That said, I would recommend getting the STK500.  You get both a serial ISP
(in system programmer) a high-voltage parallel programmer to save your fat
when you accidentally program the chip into a state that can't be accessed
via ISP and a dang good bread board to boot.
Show quoted textHide quoted text
-----Original Message-----
From: Phil


One thing that I wish there was (could be I just haven't found it) is
a Minimum AVR page.  It would have the minimum circuit needed to get
going plus a description of the simplest programming and development
envt.  The info is all there it just takes work to find it as you
have to wade through a lot of unfamiliar jargon and try to figure out
what is relevant and what isn't.  Its good for fast track learning
but some people would feel overwhelmed.

Re: [AVR-Chat] start AVR

2004-03-27 by John Johnson

How about a Butterfly? They are about US$20, and will actually do 
something when you buy them. Later you can reprogram it, add connectors 
for I/O, etc.

Regards,
   JJ
Show quoted textHide quoted text
On Friday, Mar 26, 2004, at 10:55 US/Eastern, ydexter wrote:

> Hello,
>
> I saw that many people likes AVR (and they say AVR is more nice built
> than a PIC). I want to start with them, but I really need some help.
> What should be my starting AVR model?
>
> After that I can find docs and a programmer to the web.
>
> thanks
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

Re: start AVR

2004-03-27 by Phil

yeah, that's pretty close.  wish I'd seen it 2 months ago!

--- In AVR-Chat@yahoogroups.com, "Larry Barello" <yahoo@b...> wrote:
> Try:
> http://homepage.sunrise.ch/mysunrise/pfleury/avr-starterkit.html
> 
> With the new mega parts all you need is the chip and a +5v supply.  
Peter's
> page, above, is pretty old.  You can dispense with the reset chip 
and you
> can use something like the "SAMPLE" programmer and the programmer 
that comes
> with WinAVR (www.avrfreaks.net) or BASCOM basic compiler 
(www.mcselec.com)
> The "SAMPLE" programmer is literally four wires from a cut-off LPT 
cable
> wired to the appropriate pins of the CPU.
> 
> Look at the schematic at the end of the ARC 1.1 users guide at
> www.barello.net/ARC for the SAMPLE programmer.  Otherwise find it 
in the
> BASCOM help file and a few other obscure places...
> Couldn't get much simpler/cheaper.
> 
> That said, I would recommend getting the STK500.  You get both a 
serial ISP
> (in system programmer) a high-voltage parallel programmer to save 
your fat
> when you accidentally program the chip into a state that can't be 
accessed
> via ISP and a dang good bread board to boot.
> 
> 
> -----Original Message-----
> From: Phil
> 
> 
> One thing that I wish there was (could be I just haven't found it) 
is
> a Minimum AVR page.  It would have the minimum circuit needed to get
> going plus a description of the simplest programming and development
> envt.  The info is all there it just takes work to find it as you
> have to wade through a lot of unfamiliar jargon and try to figure 
out
> what is relevant and what isn't.  Its good for fast track learning
> but some people would feel overwhelmed.

RE: [AVR-Chat] Re: start AVR

2004-03-27 by joseph torelli

This is where I started:

http://members.aol.com/AVRProject/index.html

And it uses a parallel port programmer.

JoeT
Show quoted textHide quoted text
-----Original Message-----
From: Phil [mailto:phil1960us@yahoo.com]
Sent: Friday, March 26, 2004 2:06 PM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: start AVR


One thing that I wish there was (could be I just haven't found it) is 
a Minimum AVR page.  It would have the minimum circuit needed to get 
going plus a description of the simplest programming and development 
envt.  The info is all there it just takes work to find it as you 
have to wade through a lot of unfamiliar jargon and try to figure out 
what is relevant and what isn't.  Its good for fast track learning 
but some people would feel overwhelmed.

I did find an AVR app note that gave me a bunch of the info I needed 
but it recommended a much more complex oscillator/reset circuit than 
it appears people actually use.   

I know a lot of people will say "buy a trainer". But my trainer 
boards all wind up being unused after an initial learning phase.  I'd 
just rather put a circuit together on a breadboard and be able to add 
or subtract to my heart's content.  Proto boards come closer but dont 
meet my personal needs.  Also, the trainers/protos dont make it easy 
to try different chips in the product family.

--- In AVR-Chat@yahoogroups.com, "ydexter" <ydexter@y...> wrote:
> Hello,
> 
> I saw that many people likes AVR (and they say AVR is more nice 
built
> than a PIC). I want to start with them, but I really need some help.
> What should be my starting AVR model?
> 
> After that I can find docs and a programmer to the web.
> 
> thanks



 
Yahoo! Groups Links

Re: [AVR-Chat] Re: start AVR

2004-03-27 by samperi@ampertronics.com.au

At 08:05 PM 26/03/04 -0000, you wrote:
>One thing that I wish there was (could be I just haven't found it) is 
>a Minimum AVR page. 

My first AVR setup was a piece of veroboard, a 40 pin socket,
a crystal and associated caps, a reset chip and a few decoupling
caps and a 90S8535. Plugged a 5 V supply, built one of those
4 resistors parallel port programmer and all the hardware was up
an running. Then, thanks to David Van Horn's website, I looked
up a few of his sample codes and I had some code assembled and
running....of course I must mention that there was more than 20 years
experience with micros before that...but that's a minor point I guess :-)
There is also AVR beginners website, and you can find links to that
on avrfreaks.com

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://ampertronics.com.au
* Electronic Design   * Technical Services   * Contract Assembly
******************************************************

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

When you say "You can dispense with the reset chip" do you mean just for
the purposes of learning or is brownout detection already integrated on
the CPU?

Are there any external supervisory circuits needed?
Show quoted textHide quoted text
-----Original Message-----
From: Larry Barello [mailto:yahoo@barello.net] 
Sent: Friday, March 26, 2004 3:15 PM
Subject: RE: [AVR-Chat] Re: start AVR

Try:
http://homepage.sunrise.ch/mysunrise/pfleury/avr-starterkit.html

With the new mega parts all you need is the chip and a +5v supply.
Peter's
page, above, is pretty old.  You can dispense with the reset chip and
you
can use something like the "SAMPLE" programmer and the programmer that
comes
with WinAVR (www.avrfreaks.net) or BASCOM basic compiler
(www.mcselec.com)
The "SAMPLE" programmer is literally four wires from a cut-off LPT cable
wired to the appropriate pins of the CPU.

RE: [AVR-Chat] Re: start AVR

2004-03-28 by Larry Barello

All mega chips have the brownout circuitry integrated into the chips.
Show quoted textHide quoted text
-----Original Message-----
From: LightYearCS [mailto:lightyearcs@zippnet.net]
Sent: Saturday, March 27, 2004 4:01 PM
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] Re: start AVR


When you say "You can dispense with the reset chip" do you mean just for
the purposes of learning or is brownout detection already integrated on
the CPU?

Are there any external supervisory circuits needed?

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

Excellent!  Thanks Larry :)

Welp, here we go folks.  I have 20 Atmel ATmeg64-16AI chips sitting here
with more on the way.  Our board is the tightest I've ever worked on.
Some chips are as small as 3mm x 3mm and yup, I get to solder them all
(joy?).  The board gerbers will be sent out within 10 days and another 7
to 9 day turnaround including shipping (using www.4pcb.com unless
someone has a better company (cheaper) although I'm getting 24 boards
for about $170 including shipping).

I won't have a lot of time for other activities over the next couple two
or three months and now I'm starting the software design cycle so I'll
have lots of questions including this one:

So like um...  using the SPI interface connected to a port will allow me
to upload the program to flash.  This is an automatic thing right?  I
mean, there is no boot loader program needed?  And this always works,
meaning, there isn't any chance of wiping some memory or register where
this upload process will stop working?

So, really SPI is it right? :)

Please understand that I'm old :P  Actually my point is I come from the
days of the 6800, 8085, and 8088.  These new fangled chips rock the
earth when it comes to peripherals.  Even though I have lots of current
experience I still find some of the newer technology almost
unbelievable.  And I have a lot of silly questions sometimes.

Perhaps the government does have some kind of deal with the aliens.

Barry
Show quoted textHide quoted text
-----Original Message-----
From: Larry Barello [mailto:yahoo@barello.net] 
Sent: Saturday, March 27, 2004 4:28 PM
Subject: RE: [AVR-Chat] Re: start AVR

All mega chips have the brownout circuitry integrated into the chips.

-----Original Message-----
From: LightYearCS [mailto:lightyearcs@zippnet.net]
Sent: Saturday, March 27, 2004 4:01 PM
Subject: RE: [AVR-Chat] Re: start AVR

When you say "You can dispense with the reset chip" do you mean just for
the purposes of learning or is brownout detection already integrated on
the CPU?

Are there any external supervisory circuits needed?


 
Yahoo! Groups Links

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

Are there public domain or free IBM PC type programs to do an ICP for
AVR?  I mean I'm sure there is.  What are the best ones?

I really need something that I can send out to clients to do field BIOS
upgrades and I don't want to write anything.  I want to send the device
out with a programming cable (which will cost a wee bit extra) and the
software so they can do their own upgrades.

Barry
Show quoted textHide quoted text
-----Original Message-----
From: Larry Barello [mailto:yahoo@barello.net] 
Sent: Saturday, March 27, 2004 4:28 PM
Subject: RE: [AVR-Chat] Re: start AVR

All mega chips have the brownout circuitry integrated into the chips.

-----Original Message-----
From: LightYearCS [mailto:lightyearcs@zippnet.net]
Sent: Saturday, March 27, 2004 4:01 PM
Subject: RE: [AVR-Chat] Re: start AVR

When you say "You can dispense with the reset chip" do you mean just for
the purposes of learning or is brownout detection already integrated on
the CPU?

Are there any external supervisory circuits needed?


 
Yahoo! Groups Links

RE: [AVR-Chat] Re: start AVR

2004-03-28 by Alex Shepherd

> Are there public domain or free IBM PC type programs to do an 
> ICP for AVR?  I mean I'm sure there is.  What are the best ones?

Two good ICSP Programmer Utilities. Both can use a simple 3 or 4
resistor programmer connected to the PC Parallel port.

PonyProg http://www.lancos.com/prog.html

AVRDude  http://savannah.nongnu.org/projects/avrdude

A good bootloader is MegaLoad that you connect to the hardware UART on
the AVR and interface to a PC's serial port.

Alex

RE: [AVR-Chat] Re: start AVR

2004-03-28 by Larry Barello

Yes, and no.  You can certainly bugger a chip using the ISP (In System
Programmer) which usually, but not always, shares the SPI pins.  Then the
only way to fix the chip is to do parallel programming with (typically, but
not always) +12v on the reset pin.  That would be impossible with a TQFP or
MLF chip...  And probably impossible with SOIC and DIP depending upon what
is connected to the various pins.

Having a bootloader would avoid the above possibility since, AFAIK, the
chips don't have the capacity to self program the fuse bits (which is where
the problem lies as you can disable ISP and crystals, etc).

Other than that, the ISP interface is automatic and something like Avrdude
would be a good tool to up-date your chips - as long as you stay away from
the fuse bits :)

Some boot loaders implement the STK500 protocol so the chip will talk
directly with AvrDude over a serial line.  This is probably the cleanest way
to do a field update.  Check out: http://avr1.org  I have never used Jason's
stuff so your mileage may vary.

Cheers!
Show quoted textHide quoted text
-----Original Message-----
From: LightYearCS
...
So like um...  using the SPI interface connected to a port will allow me
to upload the program to flash.  This is an automatic thing right?  I
mean, there is no boot loader program needed?  And this always works,
meaning, there isn't any chance of wiping some memory or register where
this upload process will stop working?

So, really SPI is it right? :)

Re: [AVR-Chat] Re: start AVR

2004-03-28 by Brian Dean

On Sun, Mar 28, 2004 at 12:38:03AM -0800, LightYearCS wrote:

> So, really SPI is it right? :)

Yep.  Like Larry said, though, be careful setting fuse bits.  By
default, the chips come set to run with the internal oscillator at 1
MHz.  You'll normally reprogram the fuses to run at a higher
frequency, and/or to use an external crystal.  There are fuse
settings, however, to run with an external clock signal, in which
case, unless you have an external clock attached you will lose the
ability to reprogram the chip after you make that change.  You can
recover by feeding in the external clock that the chip is expecting in
that configuration, reenter programming mode, then reset the fuse bits
as needed.

Just a little something to be aware of - this is probably one of the
more common problems when you had programming communication
established at one point, but for "some reason" it doesn't work now.

Also, for ISP programming purposes, which uses an SPI protocol, the
ATmega64 DOES NOT use the MISO/MOSI pins as labeled on the chip
pinout.  Look for PDO and PDI instead.  It does use the SPI SCK pin
for clock, though.  Be sure you double check your programming header
is connected to PDO and PDI instead of MISO and MOSI before ordering
your boards :-) See the "memory programming" section of the datasheet
to double check the pin mapping for ISP programming.

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

Re: [AVR-Chat] Re: start AVR

2004-03-28 by David VanHorn

At 09:56 AM 3/28/2004 -0500, Brian Dean wrote:

>On Sun, Mar 28, 2004 at 12:38:03AM -0800, LightYearCS wrote:
>
>> So, really SPI is it right? :)
>
>Yep.  Like Larry said, though, be careful setting fuse bits.  By
>default, the chips come set to run with the internal oscillator at 1
>MHz.  

Leave CKOPT = 1.

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

Wait.... What?

"There are fuse settings, however, to run with an external clock signal,
in which case, unless you have an external clock attached you will lose
the ability to reprogram the chip after you make that change."

Are you saying that if I use an external clock I can't upload the flash
anymore?  I hope not.

I'll be using an external crystal and perhaps an external clock chip.
I'll need some accuracy because this device is used for timing
applications up to about 80 seconds.

Barry
Show quoted textHide quoted text
-----Original Message-----
From: Brian Dean [mailto:bsd@bdmicro.com] 
Sent: Sunday, March 28, 2004 6:57 AM
Subject: Re: [AVR-Chat] Re: start AVR

On Sun, Mar 28, 2004 at 12:38:03AM -0800, LightYearCS wrote:

> So, really SPI is it right? :)

Yep.  Like Larry said, though, be careful setting fuse bits.  By
default, the chips come set to run with the internal oscillator at 1
MHz.  You'll normally reprogram the fuses to run at a higher
frequency, and/or to use an external crystal.  There are fuse
settings, however, to run with an external clock signal, in which
case, unless you have an external clock attached you will lose the
ability to reprogram the chip after you make that change.  You can
recover by feeding in the external clock that the chip is expecting in
that configuration, reenter programming mode, then reset the fuse bits
as needed.

Just a little something to be aware of - this is probably one of the
more common problems when you had programming communication
established at one point, but for "some reason" it doesn't work now.

Also, for ISP programming purposes, which uses an SPI protocol, the
ATmega64 DOES NOT use the MISO/MOSI pins as labeled on the chip
pinout.  Look for PDO and PDI instead.  It does use the SPI SCK pin
for clock, though.  Be sure you double check your programming header
is connected to PDO and PDI instead of MISO and MOSI before ordering
your boards :-) See the "memory programming" section of the datasheet
to double check the pin mapping for ISP programming.

-Brian
-- 
Brian Dean
http://www.bdmicro.com/


 
Yahoo! Groups Links

Re: [AVR-Chat] Re: start AVR

2004-03-28 by John Johnson

The chip must have a clock source to be programmed. Either internal or
external. When you receive the chip, it is configured to use the 
internal oscillator.
If you program it to use an external oscillator, you must have the 
external
oscillator running to reprogram the chip.

Regards,
   JJ
Show quoted textHide quoted text
On Sunday, Mar 28, 2004, at 15:12 US/Eastern, LightYearCS wrote:

> Wait.... What?
>
> "There are fuse settings, however, to run with an external clock 
> signal,
> in which case, unless you have an external clock attached you will lose
> the ability to reprogram the chip after you make that change."
>
> Are you saying that if I use an external clock I can't upload the flash
> anymore?  I hope not.
>
> I'll be using an external crystal and perhaps an external clock chip.
> I'll need some accuracy because this device is used for timing
> applications up to about 80 seconds.
>
> Barry
>
>
> -----Original Message-----
> From: Brian Dean [mailto:bsd@bdmicro.com]
> Sent: Sunday, March 28, 2004 6:57 AM
> Subject: Re: [AVR-Chat] Re: start AVR
>
> On Sun, Mar 28, 2004 at 12:38:03AM -0800, LightYearCS wrote:
>
>> So, really SPI is it right? :)
>
> Yep.  Like Larry said, though, be careful setting fuse bits.  By
> default, the chips come set to run with the internal oscillator at 1
> MHz.  You'll normally reprogram the fuses to run at a higher
> frequency, and/or to use an external crystal.  There are fuse
> settings, however, to run with an external clock signal, in which
> case, unless you have an external clock attached you will lose the
> ability to reprogram the chip after you make that change.  You can
> recover by feeding in the external clock that the chip is expecting in
> that configuration, reenter programming mode, then reset the fuse bits
> as needed.
>
> Just a little something to be aware of - this is probably one of the
> more common problems when you had programming communication
> established at one point, but for "some reason" it doesn't work now.
>
> Also, for ISP programming purposes, which uses an SPI protocol, the
> ATmega64 DOES NOT use the MISO/MOSI pins as labeled on the chip
> pinout.  Look for PDO and PDI instead.  It does use the SPI SCK pin
> for clock, though.  Be sure you double check your programming header
> is connected to PDO and PDI instead of MISO and MOSI before ordering
> your boards :-) See the "memory programming" section of the datasheet
> to double check the pin mapping for ISP programming.
>
> -Brian
> -- 
> Brian Dean
> http://www.bdmicro.com/
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

Oh!  Of course.  That kinda went without saying I thought.  So, you
basically need the clock whether it's internal, external crystal, or
external clock and it must be running.  Gotcha :)
Show quoted textHide quoted text
-----Original Message-----
From: John Johnson [mailto:johnatl@mac.com] 
Sent: Sunday, March 28, 2004 12:20 PM
Subject: Re: [AVR-Chat] Re: start AVR

The chip must have a clock source to be programmed. Either internal or
external. When you receive the chip, it is configured to use the 
internal oscillator.
If you program it to use an external oscillator, you must have the 
external
oscillator running to reprogram the chip.

Regards,
   JJ

On Sunday, Mar 28, 2004, at 15:12 US/Eastern, LightYearCS wrote:

> Wait.... What?
>
> "There are fuse settings, however, to run with an external clock 
> signal,
> in which case, unless you have an external clock attached you will
lose
> the ability to reprogram the chip after you make that change."
>
> Are you saying that if I use an external clock I can't upload the
flash
> anymore?  I hope not.
>
> I'll be using an external crystal and perhaps an external clock chip.
> I'll need some accuracy because this device is used for timing
> applications up to about 80 seconds.
>
> Barry
>
>
> -----Original Message-----
> From: Brian Dean [mailto:bsd@bdmicro.com]
> Sent: Sunday, March 28, 2004 6:57 AM
> Subject: Re: [AVR-Chat] Re: start AVR
>
> On Sun, Mar 28, 2004 at 12:38:03AM -0800, LightYearCS wrote:
>
>> So, really SPI is it right? :)
>
> Yep.  Like Larry said, though, be careful setting fuse bits.  By
> default, the chips come set to run with the internal oscillator at 1
> MHz.  You'll normally reprogram the fuses to run at a higher
> frequency, and/or to use an external crystal.  There are fuse
> settings, however, to run with an external clock signal, in which
> case, unless you have an external clock attached you will lose the
> ability to reprogram the chip after you make that change.  You can
> recover by feeding in the external clock that the chip is expecting in
> that configuration, reenter programming mode, then reset the fuse bits
> as needed.
>
> Just a little something to be aware of - this is probably one of the
> more common problems when you had programming communication
> established at one point, but for "some reason" it doesn't work now.
>
> Also, for ISP programming purposes, which uses an SPI protocol, the
> ATmega64 DOES NOT use the MISO/MOSI pins as labeled on the chip
> pinout.  Look for PDO and PDI instead.  It does use the SPI SCK pin
> for clock, though.  Be sure you double check your programming header
> is connected to PDO and PDI instead of MISO and MOSI before ordering
> your boards :-) See the "memory programming" section of the datasheet
> to double check the pin mapping for ISP programming.
>
> -Brian
> -- 
> Brian Dean
> http://www.bdmicro.com/
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>


 
Yahoo! Groups Links

Re: [AVR-Chat] Re: start AVR

2004-03-28 by Brian Dean

On Sun, Mar 28, 2004 at 12:27:40PM -0800, LightYearCS wrote:

> Oh!  Of course.  That kinda went without saying I thought.  So, you
> basically need the clock whether it's internal, external crystal, or
> external clock and it must be running.  Gotcha :)

Right.  A common error is to solder on an external crystal, and then
configure the fuse bits for an external clock.  Crystal != clock.
When that happens, the only way to regain programming mode (assuming
ISP) is to input a clock signal, perhaps desoldering the crystal in
the process, re-enter programming mode, and reset the fuses.

It's just something to be aware of - no need to dwell on it.  But
usually when one has previously had the chip running, then made some
fuse bit changes perhaps to enable some unrelated feature, and the
chip no longer appears to work, this is the problem.

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

RE: [AVR-Chat] Re: start AVR

2004-03-28 by LightYearCS

Now, do you usually need to remove the chip to reprogram?

So the fuses are "soft" fuses and can be reset huh?

Okay so basically the SPI interface (and yes, I knew about the alternate
pins) is good to use, just make sure to NEVER blow the wrong fuse when
programming.

Normally I don't think I would even need to change the status of a fuse
in the field.

Barry
Show quoted textHide quoted text
-----Original Message-----
From: Brian Dean [mailto:bsd@bdmicro.com] 
Sent: Sunday, March 28, 2004 1:01 PM
Subject: Re: [AVR-Chat] Re: start AVR

On Sun, Mar 28, 2004 at 12:27:40PM -0800, LightYearCS wrote:

> Oh!  Of course.  That kinda went without saying I thought.  So, you
> basically need the clock whether it's internal, external crystal, or
> external clock and it must be running.  Gotcha :)

Right.  A common error is to solder on an external crystal, and then
configure the fuse bits for an external clock.  Crystal != clock.
When that happens, the only way to regain programming mode (assuming
ISP) is to input a clock signal, perhaps desoldering the crystal in
the process, re-enter programming mode, and reset the fuses.

It's just something to be aware of - no need to dwell on it.  But
usually when one has previously had the chip running, then made some
fuse bit changes perhaps to enable some unrelated feature, and the
chip no longer appears to work, this is the problem.

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

 
Yahoo! Groups Links

Re: [AVR-Chat] Re: start AVR

2004-03-29 by Brian Dean

On Sun, Mar 28, 2004 at 03:05:46PM -0800, LightYearCS wrote:

> Now, do you usually need to remove the chip to reprogram?

Nope - not as long as you are using ISP (serial) method.  Many AVR's
can be programmed using a parallel method that generally requires
removing the chip from the board due to the higher voltages involved
(12V).

> So the fuses are "soft" fuses and can be reset huh?

Yep.  They set things like the type of clocking to be used (internal
oscillator, external crystal, external clock, etc), brown-out enable
and levels, startup delays, watchdog reset settings, JTAG enable, etc.

> Okay so basically the SPI interface (and yes, I knew about the
> alternate pins) is good to use, just make sure to NEVER blow the
> wrong fuse when programming.

Yes.  They do have a built-in failsafe such that you are not supposed
to be able to change the SPIEN fuse bit - the one that enables serial
programming, when programming using the serial interface.  But you can
still make it inconvenient by changing the clock settings to something
your board doesn't support.

> Normally I don't think I would even need to change the status of a
> fuse in the field.

Sounds reasonable.

Another method you might consider is to use the boot loader feature
where you can install a seperate program in FLASH that will get
control at reset time, and it can decide whether or not to reprogram
the "main appliction" FLASH area.  For example, you can have it check
the status of a few switches or something and if they are pressed,
then download a new program from some interface in order to reprogram
the main application.  If the switches aren't set, just jump to the
main application and skip reprogramming.  The programming interface
could simply be a serial port and your customers wouldn't need a
programmer, just a PC with a serial port.  And I don't think you can
change fuse bits from this method of programming so there would be
little worry that someone would mess up the fuse bits by accident.

Good luck!

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

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.