{"id":43,"date":"2012-05-04T10:34:53","date_gmt":"2012-05-04T09:34:53","guid":{"rendered":"http:\/\/www.kanda.com\/blog\/?p=43"},"modified":"2012-05-04T11:09:48","modified_gmt":"2012-05-04T10:09:48","slug":"avr-microcontroller-code","status":"publish","type":"post","link":"https:\/\/www.kanda.com\/blog\/microcontrollers\/avr-microcontrollers\/avr-microcontroller-code\/","title":{"rendered":"AVR Microcontroller C Code"},"content":{"rendered":"

The AVR microcontroller is excellent with C code because it was designed with C in mind. Atmel have also made it easy to use C in AVR Studio, as WinAVR compiler can run from within AVRStudio just like the assembler.<\/p>\n

Only a few years ago, using C compilers involved complicated commandline instructions and make files but WinAVR more or less takes care of this for you. WinAVR is based on the free GNU-GCC compiler but is much friendlier, especially for beginners.<\/p>\n

<\/p>\n

When you create a project in AVRStudio, you just choose C project and write your code in the editor. Then you just click Make and WinAVR does the rest. There are a few settings to be aware of in the compiler that you should set.<\/p>\n

Go to Project – Configuration Options<\/strong> menu, and on first screen check these points:<\/p>\n