PDA

View Full Version : [Question(s)] Programming avr's



ambi40
09-04-2008, 01:11 PM
Hello Everyone,

My name is Amber and i am a moving light technician for a co
called stage tech and i am interested in learning how to program
the E Prom chip that makes them work.is there anyone out there willing to educate
me in this area of programming? and yes i do realize that it will not be an easy
task to accomplish.thanks again.

Amber Ruiz.

DresnerRobotics
09-04-2008, 01:33 PM
Hi Amber! We spoke on the phone. If I recall, the lighting setup you're using is controlled by an Atmega128? But not everything on the light unit is controllable, so you're looking to learn how to program it.

Here are a few resources I've found for getting started:

http://imakeprojects.com/Projects/avr-tutorial/

http://esopenkolinks.blogspot.com/2008/03/learning-atmega.html

Adrenalynn
09-04-2008, 01:39 PM
Hi Amber,

Welcome to the TRC! Andrew pointed me towards this thread - you talked with him earlier.

I've done a fair bit of AVR C Programming. Do you already program in ANSI C?

The first thing you'll need is a programmer. I use the Atmel AVR STK-500. It's a very advanced and complex programmer - but on the plus side it will program just about anything in the AVR line (I haven't found anything it won't program...) If you're wanting to use only specific parts, you could find a simpler programmer that supports just that part.

The STK-500 comes with all the tools you need to get started, but if you already have a programmer, you'll want to look at GNU avr-gcc.

If you already have experience with programming in gcc under Linux, Windows, Mac, whatever - you'll catch on to the tool-chain almost immediately. Otherwise, there's a bit of a learning curve.

AVR Freaks is the be-all-end-all resource for AVR programming. http://www.avrfreaks.net

http://www.avrfreaks.net/index.php?module=FreaksTools&func=viewItem&item_id=145

You're wanting the winavr and avr_gcc toolchain from there. That will allow you to handle your programming in C, C++, and in AVR Assembler. (You'll still need a hardware programmer, though!)

Mouser was the least expensive resource I found for the STK-500 (about $85 when I bought it): http://www.mouser.com/Search/Refine.aspx?Msid=55650000&Mkw=ATSTK500

You'll find other lower-end programmers on the AVR Freaks site.

If this leads to any questions, please feel free to post away! JonHylands here is an AVR programming wiz too.

ambi40
09-04-2008, 01:39 PM
Yes It is an Atmega32 and that info would be great
I do appreciate all the help i can get. .

DresnerRobotics
09-04-2008, 02:06 PM
Speaking with Jon and Adrenalynn here a bit behind the scenes....

Aside from learning C, this project is going to be considerably more difficult if you don't end up getting the source code from the lighting unit manufacturer. You'd basically have to start from scratch.

JonHylands
09-04-2008, 02:16 PM
Starting from scratch is certainly doable, but you need to figure out what the ATmega interfaces to, and how the actual light is controlled.

- Jon

Adrenalynn
09-04-2008, 02:20 PM
And, personally, if I had to go that route I'd yank the original ATMEGA32 off the board and throw a new chip on it, then lock the original in my fire-resistant/waterproof safe, and tell Thor! [The Jack Russell Terminator] to guard it like it was full of Raccoons. ;)

In a worst-case scenario, the program could be copied/dumped from the AVR and reverse engineered - but that's a very advanced topic, and I'd probably just design a new controller that did what I wanted and then some from the get-go. ;)

robot maker
09-04-2008, 10:19 PM
i like your links tyberius ,look great when i get into using axon board
i know basic stamp,so avr may not be to hard to learn

also adrenalynn links too,mostly thinking of getting stk-500 ,i heard it was the best programming tool
link to avrfreaks.net i seen before and bookmark it
latter on like to learn programming from other processor sources,like picbasic pro


Hi Amber! We spoke on the phone. If I recall, the lighting setup you're using is controlled by an Atmega128? But not everything on the light unit is controllable, so you're looking to learn how to program it.

Here are a few resources I've found for getting started:

http://imakeprojects.com/Projects/avr-tutorial/

http://esopenkolinks.blogspot.com/2008/03/learning-atmega.html