This is a simple blinking LED program. We will look at basic structure and cover specifics about the syntax. First let’s talk about the files that surround the main document you created. These are called “includes” and they bring code into the main document. This code adds or augments the functionality of your code. Includes can be found in the WinAvr folder and in the current project folder. This include is outside the project folder and uses the <> around the name #include <avr/io.h> Schematic Program /*********************************************************** Program : LED Blink. Software: IDE: Atmel Studio 4 Compiler: avr-gcc Microcontroller - Atmega 16 Port B : LED Copyright (C) 2014 - 2016 H.E.A.R.T. Tech Solutions, India. ************************************************************/ #include<avr/io.h> #include<util/delay.h> void main() { DDRB=0b1111111; // PORT B All Bits Declared
Micro2Nano is One Stop Solutions for all the Tutorials, Projects and Queries related to Electronics, Electrical, Microcontrollers, Embedded System, Robotics, Datasheets, Tech News and Many More.