Skip to main content

Posts

Showing posts from January, 2016

AVR First Program - LED Blink

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

AVR Microcontroller - Basic Input / Output Operations

AVR is 8 bit microcontroller. All its ports are 8 bit wide. Every port has 3 registers associated with it each one with 8 bits. Every bit in those registers configure pins of particular port. Bit0 of these registers is associated with Pin0 of the port, Bit1 of these registers is associated with Pin1 of the port, …. and like wise for other bits. These three registers are as follows : (x can be replaced by A,B,C,D as per the AVR you are using) – DDRx register – PORTx register – PINx register DDRx (Data Direction Register) configures data direction of port pins. Means its setting determines whether port pins will be used for input or output. Writing 0 to a bit in DDRx makes corresponding port pin as input, while writing 1 to a bit in DDRx makes corresponding port pin as output. example: to make all pins of port A as input pins : DDRA = 0b00000000; to make all pins of port A as output pins : DDRA = 0b11111111; to make lower nibble of port B as output and

Upload HEX file to AVR Microcontroller - Using SINAPROG

Resource Download  Download SINAPROG Program Burning Software - Download USBASP Driver Download - Download USBASP Programmer Schematic and Firmware - Download  SINAPROG is use to upload HEX file in all AVR Microcontrollers. To upload HEX file in Microcontroller we require following things :- 1. HEX Code Generated by AVR Studio 4  2. AVR USBASP Programmer 3. AVR Training Board 4  FRC 10-10 Female Cable  5  Blank AVR Microcontroller Step to Program Step 1 :   Connect USBASP Programmer with AVR Trainer Board in ISP ( In System Programming ) section using FRC Cable. Step 2 :  Attach Blank AVR Microcontroller (Ex - Atmega 16 ) to AVR Trainer Board. Step 3.  Open SINAPROG Software, In HEX Section - Click Folder Icon and select the HEX file to be uploaded in Microcontroller  Step 4: Select the Microcontroller in Device Section in which the Program is to be uploaded or Click Search if already connected. Step 5: Select " USBASP Program

Worlds Smallest Magnetic Data Storage

There will be a time when all the major technologies in the world will be in nanoscale. Recent developments have been undergone in daily used electronic gadgets like mobiles, computers, laptops and so on. As a part of this, a group of researchers from IBM and CFEL (Centre for free-electron Laser Science) have been successful in developing the world’s smallest magnetic data storage unit. The newly invented unit needs only 12 atoms for storing one bit. That is, 96 atoms for storing one byte. In a conventional memory storage unit a byte consists of half a billion atoms and hence this new technology will prove to be a breakthrough for producing the new generation of devices called “nanogadgets”. This nano data storage unit was made by placing atom by atom by using a STM (scanning tunneling microscope) at IBM’s Almaden research centre in San Jose, California. First a regular pattern of iron atoms were constructed and then they were aligned in such a way that each row co

Capacitors and Its Working

A capacitor is a passive electric element that accumulates energy in the form of electrostatic field. In simple words, capacitor includes 2 conducting plates alienated by the dielectric (an insulating material). The capacitance is inversely relative to the alienation amid the plates and it’s directly relative to the surface area of the conducting plates. Capacitance also relies on the dielectric constant of the material alienating the plates. The customary unit of capacitance is termed as farad, abbreviated. This is a huge unit; other universal units are known as microfarad, abbreviated 1 µF =10 -6 F (µF) & the picofarad, abbreviated 1 pF = 10 -12 F (pF). What is Capacitor?   “An electric circuit element used to store charge temporarily, consisting in general of two metallic plates separated and insulated from each other by a dielectric, also known as condenser.” Basics of Capacitor: A capacitor in general is like a battery. The

AVR Studio 4 - Project Guide & Working

AVR studio is an Integrated Development Environment (IDE) by ATMEL for developing applications based on 8-bit AVR microcontroller. Prior to installation of AVR Studio you have to install the compiler WinAVR. This will allow AVR Studio to detect the compiler Step 1 : Open Software AVR Studio 4 Step 2 : Click on New Project Step 3 : Click on AVR GCC Write the project name Select your project location. Click on Next >> Step 4 : Click on AVR Simulator in left block and then select your controller (e.g.: ATmega16). Click on finish button Step 5 : Write the code in main body area. Save the project file. Step 6 : Go to BUILD -> Compile. This will compile your code and generate error if any. If there is any, rectify the code and Compile Again. After Successful Compilation  This will generate hex file of the code. Use that Hex file to burn your microcontroller. Where you will find Hex file? Just go to th

AVR Studio 4 Installation Guide

Introduction to AVR Studio 4 AVR Studio 4 is Atmel's integrated development environment (IDE) specially design to write and debug applications for AVR devices. The suite includes a text editor to write programs, an assembler to translate assembly code into object programs, and a simulator to watch code's behavior without need of having an AVR device attached.   System Requirements : Window XP Window Vista Window 7(32-Bit) Window 7(64-Bit) Windows 8 Step 1: Download AVR Studio 4 from Here - Download Step 2: Download Win AVR from Here - Download Step 3:  Install Win AVR Software Step 4: Installing AVR Studio Locate the setup program in the folder where you downloaded the software. In this case, the name of the setup program is aStudio4b460.exe . Double-click on aStudio4b460.exe to start the installation. Select Next on the appearing window. Read the license agreement, select the "I accept" option, and

3D Printer

What is 3D Printing ? Invented by a man named Chuck Hull back in 1986, 3D printing is a process of taking a digital 3D model and turning that digital file into a physical object. While Hull went on to launch one of the world’s largest 3D printer manufacturers, 3D Systems, his invention concentrated solely on a fabrication process called Stereolithography (SLA). Since that time numerous other 3D printing technologies have been developed, such as Fused Deposition Modeling (FDM)/Fused Filament Fabrication (FFF), Selective Laser Sintering (SLS), PolyJetting and others, all of which rely on layer-by-layer fabrication and are based on a computer code fed to the printer. While there are numerous technologies which can be used to 3D print an object, the majority of 3D printers one will find within a home or an office setting are based on the FDM/FFF or SLA processes, as these technologies are currently cheaper and easier to implement within a machine. We will go furt