2

Ok I've been looking at a few tutorials and such, and i've done my reading on getting started with an AVR on a breadboard (flashing a few LEDS and such) I know i'll need an AVR 8bit ATtiny and a USB AVR programmer + Breadboard and whatever those wires are called for testing (I forget what they all called, they are like prestripped testing wires....)

Anyways....is there anything else I need? to just get started. I worry because I see these Arduino's and AVR prototype boards and they have TONS of extra stuff on them (that im not even sure what they are)

Am I missing something....Like do I need FLASH memory or anything additional to just do basic stuff?

4 Answers4

5

In my opinion, first step should be to get four basic documents.

First one you should get is the short version of the datasheet for your microcontroller. It shouldn't be more than 20-30 pages, so do read it whole before touching the microcontroller. Don't panic if you don't understand everything (or anything!). Just read it a couple of times. While reading it, there are few thing you should pay attention to. The page you'll probably use the most is the pin configurations page. It will probably be one of the first pages. It may be a good idea to print it and keep it close to the microcontroller. There you'll find out what each pin does.

After that, it would be a good idea to get the whole datasheet. It will probably have several hundred pages, but you don't need to read it whole at once. Instead just read the bookmarks list and if you're having any problems with a specific feature, read the part of datasheet which describes it. It would be a good idea to take a look at electrical characteristics page. There you'll find relationship between voltages and frequencies, voltages for high and low, maximum output currents and other important information without which your microcontroller can die. That part may just be few pages long, so do read it.

Next two documents are a bit more complicated, but they focus on some things that are very important. They are Atmel AVR042: AVR Hardware Design Considerations and AVR040: EMC Design Considerations. They're a bit scary at first, but do read them, since they're only around 17-18 pages each. In them you'll find ways how to correctly connect the reset pin, what types of decoupling capacitors to use (you didn't mention these on your parts list for example), how to set them up and so on. As with other manuals, you don't have to worry if you don't understand everything at first. Since you're a beginner, just focus on parts which explain how to connect reset pin and how to use decoupling capacitors. For the rest, it's good read, because at one point your microcontroller board probably won't work and you'll need to figure out why. You'll be able to find some pitfalls there.

I made an AVR board few months ago and had some beginner questions about it. For example how to connect decoupling capacitors when pins aren't close.

Also take a look here. Similar situation, except that guy had ATmega 16. I wrote a bit about setting up the toolchain and getting a programmer there.

AndrejaKo
  • 23,261
  • 25
  • 110
  • 186
2

Sounds like you have everything you NEED in order to make this thing work in a hardware sense. You will definitely want the data sheets for your processor, which will be downloadable from the manufacturer's website. Another very useful thing is example code. There should be some (again) on the manufacturer's website as well as other various places online and in books. Once you get everything hooked up to your computer, you are going to want to spend some significant time learning how to use your IDE. I recommend using an IDE that is supported by the manufacturer when you are a beginner. Another thing you might want to keep in mind is that learning how to program this thing is going to be a lot easier if you have a USB dongle that supports in system debugging. In other words, a mode in which you can write your program to the chip, begin execution, pause execution, set breakpoints and examine memory. Hope this helps!

  • It is unfortunate that hardware debuggers for AVR are very expensive (for example the JTAGICE mkII is over $300 on digikey). Do you know of any cheap alternatives? – AndrejaKo Apr 18 '11 at 00:27
1

no there's flash inside the chip, sounds like you're - make sure you have current limiting resistors for the leds

Taniwha
  • 1,636
  • 9
  • 8
1

To work with bare AVR chips you will need some way to put your code into the on-chip flash.

The arduino really doesn't have much else on it besides an AVR. The thing with the AVR on the arduino is that it's pre-flashed with a boot loader that can use the AVR's serial port to accept code and reflash itself. As far as hardware goes, it basically just has some power conditioning, an oscillator, and a USB-to-serial interface. It's better to think of the on-board USB interface as part of the PC rather than part of the arduino. I think you can get the AVRs with the arduino boot-loader pre-flashed, in which case you should be able to program it on a breadboard with the arduino PC support s/w, as long as you have an appropriate serial connection.

JustJeff
  • 19,163
  • 3
  • 48
  • 75
  • I thought most MC's have on-board oscillators. –  Apr 18 '11 at 14:41
  • They do, however, from what I've read the accuracy of them isn't nearly as good as a crystal. This can be important for things like serial communication or achieving accurate micro-second timing. – Dylan Vester Apr 20 '11 at 03:36