English French German Italian Portuguese Russian Spanish

v1

Survey

Which microcontroller family do you prefer?
 

Did you know?

Recently graduated engineers have higher average starting salaries than their counterparts with other degrees. These salaries vary by branch of engineering and level of education.

Forum elektronika, schematy, porady, naprawa

FacebookTwitter

 

Home > AVR tutorial > Introduction > How to start programing AVR?
(2 votes, average 4.00 out of 5)
AVR tutorials - Introduction
How to start programing AVR? 4.0 out of 5 based on 2 votes.

 

question-markFirst question that you ask yourself when starting to work with microcontrollers is what do i need?

Here is answer!

You need microcontroller, you should buy one. I recommend ATmega8, ATmega16 or ATmega8535 because they have all integrated peripherals that you will need to learn how to use it and have numerous examples online.

 

Second thing you will need is tool to program microcontroller. You need this to translate program written by man to machine language so it can be executed. There are assemblers and higher level languages such as C, Basic, Pascal..

Assembler is just too complicated and takes lots of time to learn. Main problem is that as project gets more complicated it is almost impossible to keep track of a program in assembler. That is why it is better to use higher level programs.

Here it’s up to you what you will choose but C is most used language for microcontrollers and my advice is to stick to tested and proven solutions. There are several C compilers for AVR online (IAR-Embedded-Workbench, WinAVR, AVR Studio) and I tested those few. The one that gives best starting point, open source libraries, wizard that helps you create blank project with basic settings and avoid typing errors is definitely CodevisionAVR.

This is why I will use it for all examples but if you must use other compiler it is very easy to recompile provided codes for other compiler. Just adjust syntax to that compiler but basic principles of what is done are shown here and same goes with other compilers.

Third thing you need is programming hardware to put compiled code inside chip. This you can make yourself. Check top menu under PROJECTS->PROGRAMATORS and choose one for AVR to build.

 

Now you are ready to start making projects.

Related Posts:
Supercapacitor
  The supercapacitor, also known as ultracapacitor or double-layer capacitor, differs from a regular capacitor in that it has a very high capacitance. A ca
An amazing event gathering fun, high technology, friendship, creativity, education and passion!
  Created in 1998, Eurobot is a international amateur robotics contest open to teams of young people, organised either in student projects or in independen
PCB design tutorial
  Designing PCB is not easy and it usually requires a lot of experience. But what should you do if you have little or no experience? Do not worry. For simp