Pages Menu
Categories Menu

Posted by on Jun 25, 2012 in Atmel AVR, Getting Started, Microcontrollers | 121 comments

Using Atmel Studio 6

Using Atmel Studio 6

This post introduces the all new IDE released by Atmel as a successor to AVR Studio 5 for programming two different architectures ARM and AVR. This also introduces you to different GUIs available for avrdude.

Introducing the All New

Atmel Studio 6 Banner

So till now, we all were using AVR Studio 5 for programming our awesome AVR microcontrollers. But now, we won’t be using that anymore, because Atmel has released its new version!

But why not AVR Studio 6?

Yes, this is a question which even I asked when I heard its name. Seems like Atmel has been manufacturing a lot of ARM Cortex-M and wanted to give its users seamless and easy-to-use environment to write, build and debug their applications written in C/C++ or assembly code. So this gave rise to the new Atmel (not AVR) Studio 6. Two architectures (ARM/AVR), One Studio! Have a look at the following video.

Using Atmel Studio 6

Those who have been using AVR Studio 5 will find the new Atmel Studio 6 “exactly” same as before! So since there isn’t quite much difference between the two softwares, I would copy and paste the same tutorial here, with the necessary changes done so that the newbies don’t have to read the previous post on AS5. So here it goes…

Embedded C welcomes you! – Revisited

Hello folks! Now that you are aware of the different port operations in AVR, we can move forward to actually code our way right through it! Since we will be using C (in fact Embedded C), the best software is the Atmel Studio 6 by Atmel. This version is the successor of the previous AVR Studio 5. The best part about both is that they are very interactive, user friendly, have awesome UI and unlike other compilers, they are totally free of cost. You can download it from here.

For those who do not want to register in order to download, I am posting the direct download links of the images here. Please report to me if the links are not proper, I will update them in that case.

You have been familiar with C (I presume). You have been working with normal data types and have been writing codes that run on a computer. But now, we will be using the same C (with some modifications) to run our microcontroller (MCU). The C used in embedded systems design is called Embedded C. Here, you will come across the same if, for, while, do while, case, switch, etc, but you will be introduced to newer data types (actually a modification of the existing ones), newer libraries, newer built-in functions and newer registers!

What do we need?

The following software will assist you in your work. You can download them from the links provided. We will discuss them one by one here.

Apart from FreeISP, there are many more GUI for avrdude, like the AVRDude-GUI, AVR8 Burn-O-Mat, etc. They all are simple to use, but I have discussed only FreeISP and eXtreme Burner here. But unlike FreeISP or eXtreme Burner, AVRDude-GUI supports all kinds of programmers supported by avrdude.


Installation of these software is pretty straightforward. You should not face any trouble in it. During the installation of Atmel Studio 6, it might need to install some other stuffs before the actual installation begins. If you face any trouble in installation, you are free to drop a comment below.

Atmel Studio 6

Let’s have a look at the features of Atmel Studio before we proceed.

  • It is an Integrated Development Environment (IDE) for AVR Software.
  • It allows chip simulation and in-circuit emulation.
  • It supports the whole AVR family of Microcontrollers (MCUs).
  • It has easy to use User Interface (UI) and gives complete overview.
  • It uses same UI for simulation and emulation.
  • It supports both Atmel AVR and ARM processors.
  • It has more than 1100 code examples.
  • It has support for both C and C++.

Creating your first AVR Project

Here is a step-by-step guide regarding how to create your first AVR Project using Atmel Studio 6.

  • After installation, open Atmel Studio 6 from StartAll Programs → Atmel → Atmel Studio 6.0
  • After opening, you will see a Start Page like this. Click on “New Project…“.
Atmel Studio 6 Start Page

Atmel Studio 6 Start Page

  • Then, you will see the following dialog box. Choose C/C++ from the ‘Installed Templates’ pane, and then choose GCC C Executable Project. Now, you can give any name to it, say MyFirstProject and choose an appropriate location in your hard drive. Check Create directory for solution. Click on OK.
Atmel Studio New Project

Atmel Studio New Project

  • Now, you will see the Device Selection dialog box. As you can see, Atmel Studio supports all the AVR MCUs and ARM processors! The list is huge! Choose your device from this list. We choose ATmega32. Click OK.
Atmel Studio Device Selection

Atmel Studio Device Selection

  • Now, you will see the following screen. Note that the basic program structure is already prepared for you. You simply need to initialize your variables and place your code inside the while(1) loop.
Atmel Studio New Project Start Screen

Atmel Studio New Project Start Screen

  • Congratulations! You have successfully created your first AVR Project! Now to further proceed with it, we need to write a code, which is discussed in the next part.
  • Have a look at the awesome AVR Studio IDE. Feel free to explore the software. We will discuss some of the required components as and when necessary.

Writing the code

LED Blinking Schematic

LED Blinking Schematic

Now that you have successfully created your new project, we need to write a code in the AVR Studio Code Window. Let’s write the code for the problem statement discussed in this post. We will write the code for blinking an LED. The schematic for physical connection is given below. Please note that it’s just a schematic of the region of interest. For full schematic, view the circuit diagram of your development board.

Now most of you will copy and paste the code. But I suggest you to type the whole code. This will introduce you to a whole new feature! While typing any keyword or inbuilt function, Atmel Studio 6 automatically displays a list of possible functions/keywords that you wish to type (thanks to Visual Basic support). You can select it and hit enter key. This increases your typing speed also (somehow!). Plus it also gives you greater confidence in writing the code.

#include <avr/io.h>
#include <util/delay.h>                // for _delay_ms()
int main(void)
    DDRC = 0x01;                       // initialize port C
        // LED on
        PORTC = 0b00000001;            // PC0 = High = Vcc
        _delay_ms(500);                // wait 500 milliseconds
        //LED off
        PORTC = 0b00000000;            // PC0 = Low = 0v
        _delay_ms(500);                // wait 500 milliseconds

Code Explained:

  • #include <avr/io.h> is a header files which provides you with various i/o operations like DDRx, PINx, PORTx, etc.
  • #include <util/delay.h> is a header file which provides you with inbuilt delay functions like _delay_loop_1(), _delay_loop_2(), _delay_ms(), _delay_us(), etc.
  • Rest of the code is simple and straightforward. For details regarding how to use DDRx and PORTx, view this post.
  • _delay_ms(xxx) provides a delay xxx milliseconds whereas _delay_us(xxx) provides a delay of xxx microseconds. There are two more types of delays which are used commonly, _delay_loop_1() and _delay_loop_2(), but to understand their concept, you need to be familiarized with timers, which we will discuss later.

Configuring Atmel Studio 6

There are two things that you must configure in order to make your code run in your MCU in a better way.

  • Setting up your clock frequency F_CPU
  • Choosing Optimization Level

Setting up Clock Frequency F_CPU

This is a very essential step. This is because if you don’t set your clock frequency, the whole timing would go wrong. _delay_ms(500) will wait for 500ms, but it counts with respect to your clock frequency. If your F_CPU setting is wrong, it won’t wait for 500ms. It will either wait longer or for lesser time. By default, delay.h defines F_CPU=1000000UL (1MHz). UL stands for unsigned long. But this isn’t always the case. Check your development board if any crystal oscillator is present or not (across the XTAL pins). If it is present, note down the exact value of the frequency. If no, then choose either 1MHz, 2MHz, 4MHz or 8MHz depending upon the fuses set in your MCU (I expect that correct fuses must have been written. We will discuss about fuses later).

Note: You must set fuse bits for a new AVR microcontroller. These fuse bits will specify the correct clock frequency (whether to follow internal clock or external clock) and many other settings. They are set only once, and hence MUST be set correctly, or else you will render your MCU useless. To learn about fuses, view this.

Now, how to put? Well, the simplest way is to add the following code before including the header files.

#ifndef F_CPU
#define F_CPU 16000000UL // or whatever may be your frequency
// remember to put it before delay.h
// now include the header files
#include <avr/io.h>
#include <util/delay.h>
// rest code goes here

You need to add it before every code you write. Or else, you can go to Project menu → HelloWorld Properties (Alt+F7)ToolchainAVR/GNU C CompilerSymbols → Add F_CPU=16000000UL to Defined Symbols.

Always check this out before compiling your code.

Atmel Studio Clock Optimization

Atmel Studio Clock Optimization

Optimizing your Code

You need to choose an appropriate optimization level for your code. Choosing the right optimization level will result in smaller hex file and faster compilation time. You can do it so by going to Project menu → HelloWorld Properties (Alt+F7)ToolchainAVR/GNU C CompilerOptimization → Choose -O2 as Optimization Level.

Atmel Studio Code Optimization

Atmel Studio Code Optimization

To know what optimization is, view this. For more details regarding optimization of code in AVR, visit this page. For details regarding the meanings of different optimization levels, view the GCC-GNU User Manual.

Building your code

After writing the code and configuring it, we proceed to build it. To do so, go to Build menu → Build Solution (F7). Now, it builds your GCC C project. After the build process has finished, you will see the details in the Output window (below the source code window). There, you can check your memory usage and the build log. In the end, it shows Build Succeeded. If it doesn’t show, check you code once again and check whether you have configured your project properly. If still it shows Build Unsuccessful, then post your queries here, I will look into the matter.

Build Output Message

Build Output Message

Now, once you have built your code, a .hex file has been generated for your .c file. You can find it in the following directory

...path to your folder/HelloWorld/HelloWorld/Debug/HelloWorld.hex

The next step is to burn this hex file into your  MCU. For this, we will use avrdude. AVR Programming can also take place from within Atmel Studio 6, but at present, Atmel Studio 6 has support only for the current Atmel Programmers. But most of the programmers available are AVRISP, AVRISP mkII, USBtinyISP, USBasp, etc. So, we will be using avrdude.

If you use AVRISP and USBtinyISP, or want to learn how to use avrdude GUI, proceed to the next section. If you use USBasp, then skip the next section and jump over to the topic eXtreme Burner – AVR.

Attention: AVR Studio 4 Users

There will be many who have previously worked with AVR Studio 4. The interface of Atmel Studio 6 is a lot different than its earlier editions. Also, the AS4 project is not supported by AS6. For that, you can open AS6, go to File menu → Import → Import AVR Studio 4 Project. This converts AS4 project into AS6 solution and then opens in AS6.

Using AVRDude with FreeISP

AVRDude stands for AVR Downloader Uploader. It is a free software that comes with WinAVR package. It’s an executable program which can be run using the command prompt. To have a detailed idea of how avrdude works and how to run it using command prompt, view this page. But if you have an AVRISP programmer, we have a GUI for you! Its called FreeISP. The download link is provided at the top.

Please Note: Apart from FreeISP, there are many more GUI for avrdude, like the AVRDude-GUIAVR8 Burn-O-Mat, etc. They all are simple to use, but I have discussed only FreeISP and eXtreme Burner here. But unlike FreeISP or eXtreme Burner, AVRDude-GUI supports all kinds of programmers supported by avrdude.

  • Open FreeISP by clicking it’s icon. If an error like Error reading application settings pops up, simply click OK.
FreeISP Interface

FreeISP Interface

  • In the window that opens, choose the paths of your avrdude.exe file and MyFirstProject.hex file. If you have an EEPROM file, choose the path, or else leave it blank. (For the above code, leave it blank).
  • Choose you device and the COM port.
  • Choose AVRISP as the programming hardware.
  • Make sure that only ‘Program Flash’ is checked.
  • IMPORTANT: Make sure that you program only flash (and EEPROM wherever necessary). DO NOT PROGRAM FUSE BITS AND LOCK BITS without any prior knowledge, or else you might end up damaging your AVR permanently.
  • Click Program.

After you click program, FreeISP invokes avrdude and passes the required comments to it as per your inputs. Then avrdude reads your device and verifies your device ID and your chip signature. After that, it erases the flash and then writes the new hex file specified by you into the flash. Then it once again reads the flash in order to verify the data. And thus after all this, your code is burnt into the MCU and your MCU is ready to use! It might have already started to respond to your code… check that the LEDs must be blinking!

If programmed correctly, you should see something like this.

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9502
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:UsersMayankSimulationsAVRStudioAVR Studio 5MyFirstProjectMyFirstProjectDebugMyFirstProject.hex"
avrdude.exe: writing flash (206 bytes):

Writing | ################################################## | 100% 0.13s

avrdude.exe: 206 bytes of flash written
avrdude.exe: verifying flash memory against C:UsersMayankSimulationsAVRStudioAVR Studio 5MyFirstProjectMyFirstProjectDebugMyFirstProject.hex:
avrdude.exe: load data flash data from input file C:UsersMayankSimulationsAVRStudioAVR Studio 5MyFirstProjectMyFirstProjectDebugMyFirstProject.hex:
avrdude.exe: input file C:UsersMayankSimulationsAVRStudioAVR Studio 5MyFirstProjectMyFirstProjectDebugMyFirstProject.hex contains 206 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 0.11s

avrdude.exe: verifying ...
avrdude.exe: 206 bytes of flash verified

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.

Now, if you use USBasp programmer, we have another awesome GUI for you, eXtreme Burner – AVR !

Using eXtreme Burner – AVR

Now for those who use USBasp programmer, the best GUI that I could find is the eXtreme Burner – AVR. This GUI has been developed by Avinash Gupta of eXtreme Electronics, India. You can find his tutorial here. It is available for Windows XP, Windows Vista/7 (32/64 bit), Linux (Fedora 10, Ubuntu 10.10). A few screen shots (Windows) are shown below.

eXtreme Burner - AVR

GUI Software for USBasp

GUI Software for USBasp - Burn Progress

GUI Software for USBasp – Burn Progress

GUI Software for USBasp - Task Complete!

GUI Software for USBasp – Task Complete!

So, I guess we are done regarding how to use Atmel Studio 6. You can connect more than one LED and create different blinking patterns! You can do whatever you want! And you can also post comments down here to let me know! ;)


This is a simple demonstration of the traditional Hello World of microcontrollers – LED Blinking. The video is made by Lavin Khandelwal for maxEmbedded. He has used the low cost 28 pin AVR Development Board and the USBasp AVR Programmer by eXtreme Electronics. He used the eXtreme Burner for burning the code.

If you have any kind of suggestions, clarifications, constructive criticism etc, you can post your comments below! :) I will be glad to see them! Also you can grab the RSS Feeds or subscribe to my website to stay updated!

Thank You

Related Posts


  1. hey, When I Step into[F11] the program,I got error as no source available .what is this?how should i deal with this?

    • Was your compilation and build successful?

  2. Code can be found here.
    this is my code my led ,but when i run it step by step [F11],
    it stuck at _delay_ms ,wait there for at least 1 minute ,can you help me on this?also tell me about asm("sei") and asm("cli")

    • Hi Fad,
      First of all, it seems that your code is incomplete. You have used theis following macro #define LEDG_ON() PORTD&=~(1<<PD5)
      But in the program, you are calling LEDR_ON();

      Secondly, all delay commands are meant for hardware and not for software simulation. In software simulation, you will get an unexpected amount of delay associated with those statements. So I would suggest you is to go and try this out in the hardware.

      Thirdly, asm("sei") is used to enable global interrupts whereas asm("cli") disables them. In general in C language, asm() is used to inline assembly code in your program. "sei" and "cli" are assembly level commands of an AVR. In other ways, if you include #include <avr/interrupt.h> in your program, then this can be achieved simply by writing sei() and cli(). See this for the Non-GNU documentation. And FYI, interrupts are not at all necessary for blinking LEDs!

  3. Hi Mayank. AVR6 -> I have problem with sprintf(...%f...) with float number. I´d like add library (libprintf_flt.a ...) or something else for conversion float to string and I don`t know how do it. Thank.

    • Hi Josef,
      sprintf() should work properly in AS6. Refer to this to determine whether you are using the correct syntax or not.

  4. plz help me and give me an example of a program to produce a scrolling message in a 16X32 LED display board……. plz tell me ..

    • Hi Raju,
      Which LED board are you using? Try referring to its datasheet for info on programming and operation.

      • Hi Mayank Sir,
        I am using Atmega 32 microcontroller with Shift register 74164 and ULN2003. I am declaring portC and portD as row drivers. and portA as controlling. PA0-clock, PA1-MR, PA2-Data.

  5. My microcontrollers, i.e. ATmega 16A and Atmega 32L are not getting detected by any of the GUIs that i have tried using (freeisp, extreme burner).
    I have both avrisp and usbasp programmers. Please help.

    • Hi Ayesha

      In general the common errors related to it are either the driver software is not installed or the cable which
      you are using is not supporting the connection required.
      For the driver software, just uninstall your Extreme Burner and then plug in your USB ASP programmer and then
      re install the Extreme Burner.

      If then also the same problem persist then send the board details which you are using, if you fabricated
      it on your own then send me the circuit diagram that you are following and if you bought it from some
      online store or market then specify the board details(i.e. company name/model no.),if any.

      • I have re-installed the software.When i try to write a hex file using extreme burner it detects the programmer saying “Found USBasp on USB port but says “Powering on failed.Cannot communicate with target chip.”
        The programmer has been purchased from just says AVR PROGRAMMER USB ISP.

        • Hi Ayesha,
          That’s because your microcontroller isn’t powered up. Make sure your microcontroller is powered up separately as well. Its not always necessary that the microcontroller will be powered up via the programmer. So power it up separately.

  6. can you let me know what were the fuse bits setting that you used for this and if i want to make a lfr using atmega16 what should the fuse bits setting be. Thanks

    • Hi Mudabbir,
      The fuses for ATmega16 are LOW 0xFF, HIGH 0xC9. They are tested to work fine. This fuse setting disables JTAG on PORTC and enables use of external crystal.

  7. Hi there. I would like to ask you a question. I try unsuccessfully to install ATMEL Studio 6 (6.1, 6 and then 5.1 and 5) but while the installation of the MS Isolated Shell 10.0, there will always be an irritating message which says “Failure to install the Shell 10.0. Problem with the Just-in-Time something”. Well, I visited msdn ( and I did exactly as written: { To disable Just-In-Time debugging by editing the registry
    On the Start menu, search for and run regedit.exe
    In the Registry Editor window, locate and delete the follow registry keys:
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionAeDebugDebugger
    If your computer is running a 64-bit operating system, delete the following registry keys also:
    HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindows NTCurrentVersionAeDebugDebugger
    Take care not to accidentally delete or change any other registry keys.
    Close the Registy Editor window. }. Still nothing. Any ideas please? Thank you in anticipation!!!!

    • Hi George,
      Sorry, but I have no idea what’s going wrong here. Try asking for solution in forums.
      However, you may also try out Em::blocks instead of Atmel Studio. Just try. You can get some info here.

  8. delay function does not seem to work. I am using atmega2560 on STK600 kit. I tried setting F_CPU=16000000UL but still delay(500) makes LED toggle every 1 second when it should be toggling every 5 seconds. Can you please help?

    • Hi Krishna

      Please ensure that your microcontroller fuse bits are burnt, because if its not so, then the microcontroller will work on its
      internal frequency. Please check the datasheet for further reference over the fuse bits.

  9. how can i link my atmel studio 6 with my proteus sofware so that i can run my program on my proteus designed circuit ??

    • No idea Ayush! I haven’t used Proteus. I’m out.

    • There is no such thing known as “linking” the two tools together. But it IS possible to run your developed code (in Atmel IDE or any similar tool that produces a .hex/.elf or .obj files as an output after compilation of a C/C++/Assembly project).

      In your circuit’s .dsn file (schematic on proteus), double click the MCU (whichever microcontroller chip you have used), a dialog box will open.
      There will be a field available in this dialog box where you are supposed to give path to your.hex file, do as it says(give path of .hex file that you wish to run).
      Click Ok/finish/done (You may set other options before exiting the box if you are ‘aware’ about what are you doing.
      After this , click the PLAY button (it starts simulation) and you will be able to see what your program does in ideal environment simulated in proteus.
      Hope it helps.:)

      • Thanks for your valuable insights Saurabh.

    • hii ayush..
      double click on your Atmega16A or other micro controller uplode your hex file in program file and then click on ok… now you r ready…

  10. Hello,

    Firstly, Thank you for this good tutorial.
    I would like to give a hint that this code effect the other bits of PORTC. It is better to use OR.

    PORTC = PORTC | 0b00000001;

    • Thanks for the suggestion Vahid! I’ll include a separate post on bit masking soon. :)

  11. When “#define F_CPU 1000000” and “_delay_ms(1000);” gives a delay of 1000 milli second or 1 second but if we use a external crystal of 16 MHz and write “#define F_CPU 16000000” and “_delay_ms(1000);” then also we get 1000 milli second delay or other delay value please explain.

    • Hello Uttam,
      Good question! _delay_ms(x) will always give you a delay of x ms, no matter what the frequency is. You’ll need to read through my timer tutorials to know how it happens.

      • Thank you Max, I saw your posts on timer but it will take some time to understand for me.
        Thanks again.
        One more question
        Atmega32 has 32KB flash memory- what does it means
        i. does it mean the size of hex file that can be accommodate.
        ii. what will be maximum line in GCC C code that can be compiled
        or any amount of line but hex file to be within 32KB after compilation.

        • Atmega32 has 32KB flash memory: it mean the size of hex file that can be accommodate and any amount of C line but hex file to be within 32KB after compilation.

  12. hello! am venezuelan and study electronic, i try program atmel atmega32 but i cant do that this work fine, think that is for the fuses, how may be for 16 mhz, using adc and timer

    • Hello Eduardo,
      Greetings! I am sorry, but I don’t think your question made much sense to me. Could you please rephrase your question? Thanks!

      • hello max
        how to program micro controller using uspasp programmer in atmel stdio 6.2 in win8. extreme burner is working fine in win 8…

        • Hi Sumit

          If extreme burner is working fine in Windows 8, all you have to do is load the Hex file of your application code found in the Debug Folder in the Project Folder onto Extreme Burner, connect the programmer (with the board) to the system, select the right microcontroller in the software and write to flash!

          Hope this helps!

  13. Dear Max,

    I have AVR Programmer from Extreeme electronics and used it with AVR burner in Window XP but is there any way to us it in Window 8
    there is one software available in “” (model no RKI1043) that can be used with Window 8, can this software be used with AVR programmer of Extreeme electronics
    What do you suggest how can I program/burn hex file to AVR microcontroller with Wndow8

    • I can’t find anything on (the domain is on sale!).
      The AVR programmer of Extreme Electronics is based on USBasp I suppose. You’ll need two things for this:
      1. Driver for the programmer – get it from the manufacuturer i.e. extreme electronics.
      2. Software to program – use the one provided by the manufacturer, or use other open source software like “avrdude”.

      • Dear MAX,

        Here is the link for Robokit AVR programmer, please see the bottom of the page for softwares

        talked with Extreeme Electronics, did not get driver for Windows 8

        • I think the driver for Windows 7 should work. You’ll need to turn off digital signature enforcement. Check this:

          To use the Robokits software, I suppose you’ll need to have an installed firmware by Robokits itself. Also, I don’t know if their software supports USBasp programmers or not.

  14. What does, ‘Error 1 attempt to use poisoned “SIG_TWI”‘ mean?

    • Where are you getting this error exactly? Could you share your code over and mention the line number where this error pops up? Thanks!

      • hello there… can I get hex file of boot loader for my usbASP.. and also let me know which software is good for uploading hex file to avr chip….

  15. Hi, thanks you for the nice tutorial.
    Can you help me with this; I am getting this error shown on the run window when I want to load my program in the micro-controller (AVR). What could be the problem?

    Here is the error

    Connecting to programmer:
    Found programmer: Id = “1 <”; type = £
    Software Version = D. ; Hardware Version = -.’
    avrdude : error: buffered memory access not supported. Maybe it isn’t a butterfly/AVR109 but a AVR910 device?
    Press any key to continue. . .

    Thank you.

    • Hello! Which ISP hardware are you using? Like USBasp, or AVRISP, etc.

      • Hello!

        I succeeded solving the problem.
        It was that my supervisor created a boot loader in such a way that I had to load the code to the microcontroller within 3sec after pressing the reset button but i was waiting more than 3 sec which resulted in that error.

        But I really appreciate your concern and the tutorials you are posting in your website, they have been of great help to me.

        Thank you

        • Oh really? Thank you for following up! I’m glad that you were able to figure it out. Cheers! :)

  16. hi sir,

    Good day. How to add own libraries in AtmelStudio6.2. I added library path but I got an error : “Error 1 UART_routines.h: No such file or directory”. How to clear this error.

    Thanks & Regards,

    • Sasi, look at our LCD tutorial. There I have discussed how to add the LCD library. Follow along the same lines and you’ll be good.

      • Hi sir,
        Good Day. Thanks alot. Now i got the way.

        Thanks & Regards,

      • hi sir,

        Thanks alot sir. I got the way now.

        Thanks & Regards,

  17. Hi,
    Sorry, I am currently working with the project where I want to store the initial value of the sensor then use it for calculating the difference with the live values of the sensor.
    I had an idea of using global variable but it gives errors – it can’t compile.
    What should I do?
    Or if you have any idea on how I can achieve that task I will be grateful.

    Kind Regards



  1. Using an Analog Accelerometer | maxEmbedded - […] Now if you follow Mayank’s ADC tutorial, there is no more explanation necessary. Here is the final code! This…
  2. How to build an IR Sensor | maxEmbedded - […] then an LED glows, and if it is composite, the LED turns off. The code was written in and…
  3. The USART of the AVR | maxEmbedded - […] as well. To learn how to write, build, compile and execute your code using Atmel Studio 6, view this…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: