Yahoo Groups archive

AVR-Chat

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

Thread

Recommendations re: ATmega32 Development

Recommendations re: ATmega32 Development

2005-04-02 by rtstofer

I recently started building an autonomous biped robot with 9 servos, 
IR command control and probably some object sensors (TBD)  The 
original had it easy, a PC controlled the bot with a wireless link.  
Instead I want to put all the behaviors in onboard code.  Kind of 
like a minimalist RoboSapien.

So, I started writing code in C for the PIC16F877.  For a number of 
reasons related to the compiler, the chip architecture and 
limitations on the free version of the $1k compiler, this isn't 
going to work.  368 bytes of RAM banked all over the place is a PITA.

I started looking at the ATmega32, the STK500 starter kit and the 
WinAVR package.  The only reason for the '32 versus, say, the '128 
is the package.  If I can avoid TQFP I will do it.  Besides, this 
bot only has 9 servos, a few analogs and probably 4 or 5 bits of 
digital input.

I am not anxious to change architectures but, if it needs to be 
done, now is the time to do it.

My questions at this point are pretty simple:  Is the ATmega32 a 
reasonable platform and will the WinAVR/AVR Studio 4 and STK500 work 
together to get this thing done?  Any particular gotchas that I will 
discover only after hours of debugging?

Any advice or links to code will be appreciated.

Thanks
Richard

Re: Recommendations re: ATmega32 Development

2005-04-03 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:

> ... Is the ATmega32 a 
> reasonable platform ...

Assuming you've read the data sheet and the resources of this MCU are 
adequate to the job, yes, this is a reasonable platform.

> ... will the WinAVR/AVR Studio 4
> and STK500 work together to get
> this thing done? ...

Yes. Although you can't kick off builds from inside AVR Studio, it 
does detect that the load file has changed due to a build kicked off 
from somewhere else (Programmer's Notepad or the command line) and 
reloads the project.

> ... Any particular gotchas ...

Note that there is no in-circuit debugger in the setup you're 
proposing. The ATmega32 supports OCD via the JTAG interface, but 
there is no JTAG header on the STK500. You will need two additional 
things, first a JTAG interface and second some kind of adapter to 
connect it to the STK500. The Atmel JTAG interface, the JTAG ICE, is 
about $300, but if this is outside your budget there are "clones" 
available which will do the job for you. It isn't too hard to puzzle 
out how to make the adapter. If you get a clone JTAG interface you 
may be able to get a ready-made adapter along with it. When you move 
from the STK500 to your own target system, remember to build in the 
JTAG header.

Graham.

Re: [AVR-Chat] Re: Recommendations re: ATmega32 Development

2005-04-03 by Ron

The AVR "ICE CUBE" jtag adapter from www.ecrostech.com plugs (via
a simple adapter) into the expansion slot of an STK500.
Works great ! Price ~$40-$45 depending on which adapters you
choose to include. Ron
Show quoted textHide quoted text
----- Original Message -----
Sent: Sunday, 03 April, 2005 10:13 AM
Subject: [AVR-Chat] Re: Recommendations re: ATmega32 Development


--- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:

> ... Is the ATmega32 a
> reasonable platform ...

Assuming you've read the data sheet and the resources of this MCU are
adequate to the job, yes, this is a reasonable platform.

> ... will the WinAVR/AVR Studio 4
> and STK500 work together to get
> this thing done? ...

Yes. Although you can't kick off builds from inside AVR Studio, it
does detect that the load file has changed due to a build kicked off
from somewhere else (Programmer's Notepad or the command line) and
reloads the project.

> ... Any particular gotchas ...

Note that there is no in-circuit debugger in the setup you're
proposing. The ATmega32 supports OCD via the JTAG interface, but
there is no JTAG header on the STK500. You will need two additional
things, first a JTAG interface and second some kind of adapter to
connect it to the STK500. The Atmel JTAG interface, the JTAG ICE, is
about $300, but if this is outside your budget there are "clones"
available which will do the job for you. It isn't too hard to puzzle
out how to make the adapter. If you get a clone JTAG interface you
may be able to get a ready-made adapter along with it. When you move
from the STK500 to your own target system, remember to build in the
JTAG header.

Graham.




Re: Recommendations re: ATmega32 Development

2005-04-03 by rtstofer

I went over to www.sparkfun.com and picked up the ATmega128 
Miniheader Board which I can ultimately use as a daughter card with 
the motherboard handling the servo connections and the IR Remote 
interface.  I also picked up the Compact Development Board with 
ATmega128 simply because it has the JTAG header and a few extra 
things like buttons and an LCD.  I will probably use this for the 
development and then stuff the code in the Miniheader Board.

While I was at it, I picked up the USB JTAG 
programmer/emulator/debugger and an ICSP dongle.

In the end, the 128 is probably the way to go.  Plenty of code space 
and more than enough RAM and EEPROM for this project.

The AVRLib code looks pretty useful.  I am planning to use the timer 
and uart routines but I have my own servo handler (I wanted to 
define 10 servos - 9 active and 1 spare).

If that Miniheader board used as a daughter card works out, I think 
the ATmega128 will become the default controller for all my projects.

Thanks for the input re: JTAG - I wasn't certain I wanted to bother 
with it but I think it will save a lot of time getting the app up 
and running.

As I read through the documentation (the manual), I couldn't prove 
that the STK500 handled the ATmega 32.  The Atmel web page says yes 
but the manual doesn't agree.  So, I decided to leave that issue 
until a later date.

--- In AVR-Chat@yahoogroups.com, "Ron" <drait1@y...> wrote:
> The AVR "ICE CUBE" jtag adapter from www.ecrostech.com plugs (via
> a simple adapter) into the expansion slot of an STK500.
> Works great ! Price ~$40-$45 depending on which adapters you
> choose to include.   Ron
>   ----- Original Message ----- 
>   From: Graham Davies 
>   To: AVR-Chat@yahoogroups.com 
>   Sent: Sunday, 03 April, 2005 10:13 AM
>   Subject: [AVR-Chat] Re: Recommendations re: ATmega32 Development
> 
> 
> 
>   --- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
> 
>   > ... Is the ATmega32 a 
>   > reasonable platform ...
> 
>   Assuming you've read the data sheet and the resources of this 
MCU are 
>   adequate to the job, yes, this is a reasonable platform.
> 
>   > ... will the WinAVR/AVR Studio 4
>   > and STK500 work together to get
>   > this thing done? ...
> 
>   Yes. Although you can't kick off builds from inside AVR Studio, 
it 
>   does detect that the load file has changed due to a build kicked 
off 
>   from somewhere else (Programmer's Notepad or the command line) 
and 
>   reloads the project.
> 
>   > ... Any particular gotchas ...
> 
>   Note that there is no in-circuit debugger in the setup you're 
>   proposing. The ATmega32 supports OCD via the JTAG interface, but 
>   there is no JTAG header on the STK500. You will need two 
additional 
>   things, first a JTAG interface and second some kind of adapter 
to 
>   connect it to the STK500. The Atmel JTAG interface, the JTAG 
ICE, is 
>   about $300, but if this is outside your budget there 
are "clones" 
>   available which will do the job for you. It isn't too hard to 
puzzle 
>   out how to make the adapter. If you get a clone JTAG interface 
you 
>   may be able to get a ready-made adapter along with it. When you 
move 
>   from the STK500 to your own target system, remember to build in 
the 
>   JTAG header.
> 
>   Graham.
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------------------
-----------
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/AVR-Chat/
>       
>     b.. To unsubscribe from this group, send an email to:
>     AVR-Chat-unsubscribe@yahoogroups.com
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service.

RE: [AVR-Chat] Recommendations re: ATmega32 Development

2005-04-03 by stevech

Suggestion:
Get a development board which supports download of your code via the serial
port. Super easy. Download via a wireless link if you wish (I do so via a
LANTRONX WiPort using WiFi to high speed serial).

The PRLLC Atmega32 is a good one. Comes with serial port bootloader already
burned in. Comes with MS Windows side of the downloader, free.  I use this.

Yes, AVR's have a much better memory addressing scheme than PICs.
Show quoted textHide quoted text
-----Original Message-----
From: rtstofer [mailto:rstofer@pacbell.net] 
Sent: Saturday, April 02, 2005 1:32 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Recommendations re: ATmega32 Development




I recently started building an autonomous biped robot with 9 servos, 
IR command control and probably some object sensors (TBD)  The 
original had it easy, a PC controlled the bot with a wireless link.  
Instead I want to put all the behaviors in onboard code.  Kind of 
like a minimalist RoboSapien.

So, I started writing code in C for the PIC16F877.  For a number of 
reasons related to the compiler, the chip architecture and 
limitations on the free version of the $1k compiler, this isn't 
going to work.  368 bytes of RAM banked all over the place is a PITA.

I started looking at the ATmega32, the STK500 starter kit and the 
WinAVR package.  The only reason for the '32 versus, say, the '128 
is the package.  If I can avoid TQFP I will do it.  Besides, this 
bot only has 9 servos, a few analogs and probably 4 or 5 bits of 
digital input.

I am not anxious to change architectures but, if it needs to be 
done, now is the time to do it.

My questions at this point are pretty simple:  Is the ATmega32 a 
reasonable platform and will the WinAVR/AVR Studio 4 and STK500 work 
together to get this thing done?  Any particular gotchas that I will 
discover only after hours of debugging?

Any advice or links to code will be appreciated.

Thanks
Richard











 
Yahoo! Groups Links

Re: Recommendations re: ATmega32 Development

2005-04-04 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
> My questions at this point are pretty simple:  Is the ATmega32 a 
> reasonable platform and will the WinAVR/AVR Studio 4 and STK500 work 
> together to get this thing done?  Any particular gotchas that I will 
> discover only after hours of debugging?

The STK500 is nice to have but the only thing it brings to the party
once you have your Mega32 situated comfortably in its new environs is
the ISP capability.  You can build an AVR 910-compatible ISP for
minimal cost, especially if you have a well-stocked parts bin.  On the
other hand, it takes a lot less time to program the full 32K using the
STK500 than it does with an AVR 910-compatible programmer.

If you can, when you design your hardware try to keep Port C, bits 2-5
free.  Those are the JTag I/O pins.  That will allow you to plug in a
JTag ICE without interfering with any of you application circuitry. 
I'm not sure what the JTag ICE costs - I got one free as a bonus for
attending an Atmel seminar about a year ago - but it's very nice to
have when you need it.

The only downside of using the GCC-WinAVR is that the optimizer makes
it difficult to debug (as is often the case).  This is most noticeable
when you're trying to do source-level debugging with JTagICE.  Often,
you no choice but to look at assembly code and try to figure out where
to place a breakpoint.  This is complicated by the fact that AVRStudio
displays WORD addresses but the assembly language output from GCC (the
.lss file) displays BYTE addresses.


Speaking of Atmel seminars, there may be one coming to a city near you:

http://www.atmel.com/seminar/mcu/default.asp


Don

Re: Recommendations re: ATmega32 Development

2005-04-04 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:

> I ... picked up the ATmega128 
> Miniheader Board ...

While we were busy answering your question about the ATmega32. Great.

Graham.

Re: Recommendations re: ATmega32 Development

2005-04-05 by rtstofer

There was a seriously long delay between the time I posted and the 
time it got on the board because I might be a spammer.

Nevertheless, the Mega32 is still a candidate for other projects and a 
little more info won't hurt me.

But, I understand your point completely!

--- In AVR-Chat@yahoogroups.com, "Graham Davies" <YahooGroups@e...> 
wrote:
Show quoted textHide quoted text
> 
> --- In AVR-Chat@yahoogroups.com, "rtstofer" <rstofer@p...> wrote:
> 
> > I ... picked up the ATmega128 
> > Miniheader Board ...
> 
> While we were busy answering your question about the ATmega32. Great.
> 
> Graham.

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.