EmbeddedRelated.com
Forums

Nubie question: Programming ATMEL MEGA8

Started by beef...@dogod.com February 24, 2006

After looking over a lot of cool projects based on the ATMEL family of
microcontroller, I just bought a bunch of ATMGAG8-16PI's.  I bought
these because I was under the impression these where very easy to play
with:

+ On chip RC oscillator, no need for a crystal for simple stuff

+ Lots of I/O pins with decent source and sink capacity - can light up
LED's directly

+ A/D converter (might be fun to play with)

+ No hardware programmer required - a few resistors hooked up to a
PC's printer port.

+ Lots of free tools - assemblers, compilers, libraries etc.

Ok, so I have a bunch of the chips and I have downloaded and built up
the Linux AVR tools, the gcc cross compiler etc.  I have also
downloaded the AVR Studio from ATMEL.

Now, here is the thing, it seems that the Linux AVR tools will support
the really simple "few resistor" type of programmer, whatever that is
called.  I am not sure if the AVR Studio or any windows 2000/XP
software will support the same few resistor type programmer.  I have
been looking around and I have found:

A few of the few simple resistors and printer port based programmers.
The gotcha is just about all of them use different pins on the printer
port!  They all use the same pins on the chip.  Is there not a
standard for this?  How do you know what will work with what?

A few that look like the above but that terminate in a dedicated
programming connection on the board with the micro.  (JTAG?)

A few of them that hang off the printer port and use different amounts
of old TTL logic between the printer port and the mico.

A few of the above that go into the dedicated connection on the board
with the micro.

Are these guys cross compatible with the same programming software?
Being a big fan 
of making my own life easy, why would you add more gunk between the
two pieces?

Then there is the breed that hangs off the serial port on a PC.

Then there are the little dedicated "programmer" boards with the ZIF
sockets and what seems to be a lot more silicon in the programmer
itself.

So, can some kind soul tell me what the really cheep and easy
"resistors and the printer port" type programmer is called and point
me at some windows software that supports it (my linux box is a
desktop in another room, and I would like to be able to program these
from my notebook in the shop.  The notebook runs XP and is unlikely to
change)

Also, if you can elaborate on what makes the different types of these
programmers "better" on "worse" then the other types.  If I catch the
bug I suspect I will upgrade if the other types do something neat or
that can not be done with the Q&D ones.

Thanks in advance!


--Matthew



*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
beef@dogod.com wrote:

> Now, here is the thing, it seems that the Linux AVR tools will support > the really simple "few resistor" type of programmer, whatever that is > called. I am not sure if the AVR Studio or any windows 2000/XP > software will support the same few resistor type programmer. I have > been looking around and I have found:
PonyProg <http://www.lancos.com/prog.html> supports some of the homebrew programmers. For $11.95 you can get the serial version pre-made <http://www.sparkfun.com/commerce/product_info.php?products_id=14>
> A few of them that hang off the printer port and use different amounts > of old TTL logic between the printer port and the mico.
That would be an STK200/300 lookalike, see the URL above. Everything you need to build one at home is on that page.
> Then there is the breed that hangs off the serial port on a PC.
Frankly I would rather spend $30 and get the official ATAVRISP AVR ISP serial cable, that works with AVR Studio (and other third-party software).
beef@dogod.com wrote:
> After looking over a lot of cool projects based on the ATMEL family of > microcontroller, I just bought a bunch of ATMGAG8-16PI's. I bought > these because I was under the impression these where very easy to play > with: > ... > Are these guys cross compatible with the same programming software?
The complexities are due to signal interfaces. Depends on the target, some are 5V signals, some are 3.3V and some are 2.5V. The worst I have seen is a 1.5V core, 3.3V i/o and mix of 3.3V and 2.5V jtag.
> Being a big fan > of making my own life easy, why would you add more gunk between the > two pieces? > > Then there is the breed that hangs off the serial port on a PC.
Kind of a build-in signal converter.
> > Then there are the little dedicated "programmer" boards with the ZIF > sockets and what seems to be a lot more silicon in the programmer > itself.
Easier but expensive.
On Fri, 24 Feb 2006 08:38:12 -0500, "beef@dogod.com" <beef@dogod.com>
wrote:

>So, can some kind soul tell me what the really cheep and easy >"resistors and the printer port" type programmer is called and point >me at some windows software that supports it (my linux box is a >desktop in another room, and I would like to be able to program these >from my notebook in the shop. The notebook runs XP and is unlikely to >change) > >Also, if you can elaborate on what makes the different types of these >programmers "better" on "worse" then the other types. If I catch the >bug I suspect I will upgrade if the other types do something neat or >that can not be done with the Q&D ones.
You may want to try Bascom AVR form MCS Electronics http://www.mcselec.com It supports many simple programmers, the simplest being "Sample Electronics programmer". Download the demo of Bascom AVR, and give it a try. You may end up using the compiler, as it has one of the best supports for peripherals, so you can concentrate on application code. The demo has a limitation of 4 kB / 2 kword code size. Tom