beginner (research stage) questions

I have been interested in building electronic stuff for years and now that I have retired it seems like a good time to actually get my hands into it. I will want to use microcontroller to operate my "devices" and have a couple questions and since I don't see the answers in the forum, it is time to actually ask.

First I have ordered my first protoboard to get things started. Next I am looking at getting an Arduino Uno (usb is only option on my computer).

However there are some questions that I feel need to be answered before I proceed:

I have seen several "projects" that use different microcontrollers like the atmega8, 168, 328, 2560 or attiny25 etc and wonder is there a separate Arduino for each of these controllers or can I just swap a 168 into the Uno and build the project?

Will I also need to buy a programmer like STK500 to get started? or will the Uno connect to my computer to load sketches direct to the controller?

I am sure I will have many more questions in the near future.
Dmac257

Will I also need to buy a programmer like STK500 to get started?

If you have an Arduino a programmer is not needed.

or will the Uno connect to my computer to load sketches direct to the controller?

Yes.

I don’t understand the other questions so I can’t answer them.

dmac257:
I have been interested in building electronic stuff for years and now that I have retired it seems like a good time to actually get my hands into it. I will want to use microcontroller to operate my "devices" and have a couple questions and since I don't see the answers in the forum, it is time to actually ask.

First I have ordered my first protoboard to get things started. Next I am looking at getting an Arduino Uno (usb is only option on my computer).

Good first purchases. This assumes you already own a digital multimeter, a real first requirement.

However there are some questions that I feel need to be answered before I proceed:

I have seen several "projects" that use different microcontrollers like the atmega8, 168, 328, 2560 or attiny25 etc and wonder is there a separate Arduino for each of these controllers or can I just swap a 168 into the Uno and build the project?

Any of the 28 pin AVR chips can be plugged into your Uno board. However you must first have the bootloader code installed into the new chip. After that programming sketches is just as normal, but you first must select the board type in the Arduino IDE that matches the chip type and board speed (16Mhz) of this new 'hybrid' board based on the chip type.

Will I also need to buy a programmer like STK500 to get started? or will the Uno connect to my computer to load sketches direct to the controller?

Originally one did need to buy or build a hardware programmer to burn bootloaders into blank chips. However there is now a sketch you can load onto a Uno board called ArduinoISP (it's in the example files) that will turn your Uno board into a hardware programmer that when wired correctly to a breadboard mounted blank chip, will burn the bootloader if the 'Arduino as ISP' programmer is selected from the burn bootloader options. This can be tricky getting everything set up correctly, but there is lots of help here from people that have done this. I bought a USBtiny programmer kit ($20) to do this kind of thing before the ArduinoISP sketch was developed and it works well also. USBtinyISP AVR Programmer Kit (USB SpokePOV Dongle) [v2.0] : ID 46 : $22.00 : Adafruit Industries, Unique & fun DIY electronics and kits

I am sure I will have many more questions in the near future.

Welcome aboard and I think you will find that this forum has plenty of knowledgeable people willing to help with your questions.

Lefty

Simply put the atmega8/168/328 are the same (same pinout) just more memory.

If you get a Uno board you with have a 328. You will load sketches directly to it using the Arduino IDE and USB cable.

If you get other atmega chips, you can get them with bootloader already installed (more $$) or get fresh one and you can put the bootloader on them using your Arduino Uno. You can also put sketches on them using the Uno.

So very simplistically put. Yes you can buy the Uno and build almost anything you see.
No you don't need a programmer.

Some more knowledgeable folks can fill in the blanks.......

Research is very good (I know! I did a lot before getting my Uno)
But all the research I did came very clear once I got my board and starting playing with it.

And the people on this forum are the best. Very eager to help!

PS. You don't even need to get a Uno to Arduino! You can build one yourself. I've looked into that also. But for 30$ I got the board. Very nice and practical to work with.

I hope this helps........don't be afraid.........jump in!

Or ........ like retrolefty said! :blush: I guess He types faster then me.

dmac257:
is there a separate Arduino for each of these controllers or can I just swap a 168 into the Uno and build the project?

Adding to retrolefty's comments: the 2560 would have to have its own board, because it's physically very different from the 168 and 328.

There are some folks who have ported subsets of the Arduino libraries to some of the ATTiny series, but not to all of them. For now, you should stick to the ATMegas: they're well-supported, and the cost is only slightly higher. As you learn more, you may decide to use the ATTiny chips for some projects, and you can figure out how you want to do that (with/without the "Arduino Lite" software) then.

Will I also need to buy a programmer like STK500 to get started?

Not to get started, if you stick with the ATMega series: you can buy them with the bootloader already burned in for only a dollar or so more than the "raw" chip cost. When I checked last year, Modern Devices had the best deals on "Arduino-ized" chips, but NKC was also reasonable. I really like Modern's RBBB for building Arduinos into projects: they're cheap, compact, and easy to mount on an IC-pattered perfboard or a stripboard.

Lefty said:

Originally one did need to buy or build a hardware programmer to burn bootloaders into blank chips. However there is now a sketch you can load onto a Uno board called ArduinoISP (it's in the example files) that will turn your Uno board into a hardware programmer that when wired correctly to a breadboard mounted blank chip, will burn the bootloader if the 'Arduino as ISP' programmer is selected from the burn bootloader options. This can be tricky getting everything set up correctly, but there is lots of help here from people that have done this.

So basically the Uno Board has a bootloader that allows you to load sketches into the Boards microcontroller, ArduinoISP sketch turnes the Uno into a the programmer and the blank microcontroller is wired up from the protoboard to the Uno Board to allow Studio to program the blank chip including burning the appropriate bootloader on the new chip.

Makes sense .. Glad I asked first !
Dmac257

So basically the Uno Board has a bootloader that allows you to load sketches into the Boards microcontroller, ArduinoISP sketch turnes the Uno into a the programmer and the blank microcontroller is wired up from the protoboard to the Uno Board to allow Studio to program the blank chip including burning the appropriate bootloader on the new chip.

No, all the various bootloader files are in the Arduino IDE core files on your PC. When you select burn bootloader from the IDE, it uses the proper bootloader file determined by what board you have selected in the Arduino IDE. Then you select burn bootloader, you have to select a hardware programmer type, which can be any arduino board that has already been prior loaded with the arduinoISP sketch. Then some wiring has to be done from the arduino board to the breadboard mounted blank avr chip. So then the Arduino IDE talks to the arduino board (acting like a hardware programmer) that talks to the blank chip. Nothing in this chain of events uses AVR Studio and I'm pretty sure that you can only use 'real' hardware programmers with AVR Studio. Getting Arduino stuff working well in AVR Studio is a pretty complex topic, some may have done it, most have problems with all the gory details. I use only the Arduino IDE platform when doing stuff with Arduino boards and chips.

Keep in mind you may be mixing up two different topics, 1. burning a bootloader into a blank chip and 2. uploading a sketch into a standalone AVR chip which contains the Arduino bootloader. Both steps are required but they are separate tasks that use different steps. Once your standalone chip has a bootloader all that you need to upload sketches from your PC to the standalone chip is to hold the Uno chip in reset with a wire jumper and then wire the pin0 and pin1 serial data to your standalone chips serial data pins, then just upload from the IDE after selecting the correct chip (board type) in the IDE.

Lefty

retrolefty:
Nothing in this chain of events uses AVR Studio and I'm pretty sure that you can only use 'real' hardware programmers with AVR Studio. Getting Arduino stuff working well in AVR Studio is a pretty complex topic, some may have done it, most have problems with all the gory details. I use only the Arduino IDE platform when doing stuff with Arduino boards and chips.

Lefty

Ok.. If I understand you right I was confusing the AVR Studio IDE software with Arduino IDE software. I already downloaded AVR Studio but didn't install from the download .. will get the Arduino IDE instead.
Thanks, Dmac257