recommendation for learning microcontroller

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi guys, I am into automation and robotic stuff, and after reading a few tutorial on the internet, I realised that one of the key component in those project is the brain - microcontroller.

And I want to learn to program with Atmel series microcontroller (as most of the tutorial I read use Atmel), another things I want to program with is C/C++, because that's something better than assembly.

If someone can point me to the right direction will be great.

here are something I want to know:


  • First of all and most important one: text book, please recommend one, beginner level
  • which Atmel AVR chip I shoud start to learn with(there are so many at Atmel and I am confused)
  • AVR studio 5 or WinAVR? AVRDude etc...
  • please recommend a programmer to up load the code

Thanks a lot :)
 

kubeek

Joined Sep 20, 2005
5,794
First of all and most important one: text book, please recommend one, beginner level
  • which Atmel AVR chip I shoud start to learn with(there are so many at Atmel and I am confused)
  • AVR studio 5 or WinAVR? AVRDude etc...
  • please recommend a programmer to up load the code
I never used any textbook, just the part´s datasheet where you can find code examples for some functions, and the documentation to avr-libc and winavr. Winavr is the compiler, avr-libc is the name for the libraries used in winavr. Also lots of googling in the beginning.

As for the chip, I recommend gettin anything that is through-hole mounted, for example I was quite happy with Atmega164. It has lots of I/Os so you can do pretty much anything with it.

Don´t use avr studio 5, get the older version 4 as it is much easier and faster to use.
Do you know C/C++ to start with? Then you should not have much problems getting into AVR. For larger projects I code my sourcefiles in netbeans IDE because it is easier to manage large chunks of code, then I copy paste the source into avr studio, compile and upload to the chip I use.

For programming I use pony prog, which is an extremely simple in-system programmer, but you need to have true serial port, beacuse the usb to RS232 converters are extremely slow for uploading the code.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi kubeek

Do you use a programmer to upload the code? or do I misunderstand something here.

So I think I should stick with the studio 4 and winavr for now, and atmega164 chip.

Thanks for your advice :)
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
I am a little confused now, so I will need studio 4 to write the code, and winavr to compile the code, and another program to upload the hex file? am I correct?

I thought the IDE(studio 4/5/6) has all the stuff(compiler/uploader/c/c++editor)
 

kubeek

Joined Sep 20, 2005
5,794
Almost, winavr is very easily integrated into the studio, so you set it up the first time ane then you just click build and you have the hex ready. Then you upload the hex into the chip. If you buy the Avr´s programmer or build some of it´s clones, you can upload the code from inside the studio as well.
 
Last edited:

kubeek

Joined Sep 20, 2005
5,794
I am not sure about the newer versions, but the bare 4 was only capable of assembler, but it is ready for avr-gcc to be installed. I will download the 6 and see how it works for me.
 

evilclem

Joined Dec 20, 2011
118
We use AVR Studio 4 for loading hex files and setting fuses on our AVR chips. We use the AVRISPII programmer to do this.

We also use WinAVR to write the actual program in C. This compiles into a binary which we then load onto the chip using a serial port by talking to our bootloader which we load on with studio.

I'd recommend obtaining a development board to start with as they come with bootstrap programs built-in and some decent documentation.
 

MrChips

Joined Oct 2, 2009
30,706
My apologies. Looks like there are enough members here willing to chime in on Atmel AVR.
I cannot give recommendations but I can provide what I have used in the past.

For experimentation, you can select any of the ATtiny or ATmega chips in DIP packages.
I have used ATtiny2313 and ATmega48, ATmega88, ATmega168.

I have used the STK500 programming board.

You should check out ATAVRDRAGON (which I have not used).
http://www.youtube.com/watch?v=yJo29VMXt90

IAR makes the best IDE (integrated development environment) software but it is expensive.

http://www.iar.com/en/Products/IAR-Embedded-Workbench/AVR/

ICC has an AVR C compiler:

https://www.imagecraft.com/devtools_AVR.html
https://www.imagecraft.com/demo_AVR.html
http://microcontrollershop.com/product_info.php?products_id=185

Any information posted here does not constitute an endorsement of any particular product.
 
Last edited:

hgmjr

Joined Jan 28, 2005
9,027

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Thanks everyone's input, especially kubeek, I think you guys have provided me all the info I need.

I am going to get a development board stk500 from atmel, and get started, hopefuly I won't smoke the board too soon lol
 

hgmjr

Joined Jan 28, 2005
9,027
I have purchased 3 or 4 stk500 boards. They have been very useful as training aides on programming AVR microcontrollers.

hgmjr
 
Top