Skip to main content

The AVR is a modified Harvard architecture 8-bit RISC single-chip microcontroller, which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

An AVR microcontroller is a type of device manufactured by Atmel, which has particular benefits over other common chips, but first what is a microcontroller?

The easiest way of thinking about it is to compare a microcontroller with your PC, which has a motherboard in it. On that motherboard is a microprocessor (Intel, AMD chips) that provides the intelligence, RAM and EEPROM memories and interfaces to rest of system, like serial ports (mostly USB ports now), disk drives and display interfaces. A microcontroller has all or most of these features built-in to a single chip, so it doesn’t need a motherboard and many components, LEDs for example, can be connected directly to the AVR. If you tried this with a microprocessor, bang!

PC microprocessors are always at least 32-bit and commonly now 64-bit. This means that they can process data in 32-bit or 64-bit chunks as they are connected to data buses this wide. The AVR is much simpler and deals with data in 8-bit chunks as its data bus is 8-bit wide, although there is now an AVR32 with 32-bit bus.

A PC has an operating system (Windows or Linux) and this runs programs, such as Word or Internet Explorer or Chrome that do specific things. An 8-bit microcontroller like the AVR doesn’t usually have an operating system, although it could run a simple one if required, and instead it just runs a single program. 

Just as your PC would be useless if you didn’t install any programs, an AVR must have a program installed to be any use. This program is stored in memory built-in to the AVR, not on an external disk drive like a PC. Loading this program into the AVR is done with an AVR programmer, usually when the AVR is in a circuit or system, hence AVR ISP or AVR In System Programmer. So what is a program?

A program is a series of instructions, each very simple, that fetch and manipulate data. In most applications where you would use an AVR, such as a washing machine controller for example, this means reading inputs, checking their state and switching on outputs accordingly. Sometimes you may need to modify or manipulate the data, or transmit it to another device, such as an LCD or serial port. A series of simple binary instructions are used to do these basic tasks and each one has an equivalent assembly language instruction that humans can understand. The most basic way of writing a program for an AVR is to use assembly language (although you could write binary numbers if you want to be pedantic). 

Using assembly language allows you to understand far more about the operation of the AVR and how it is put together. It is also produces very small and fast code. The disadvantage is that you as the programmer have to do everything, including memory management and program structure, which can get very tedious.

To avoid this, high level languages are increasingly being used to write programs for the AVR, C in particular but also Basic and Java derivatives. High level means that each line of C (or Basic or Java) code can translate into many lines of assembly language. The compiler also deals with the program structure and memory management so it is much easier. Commonly used routines, such as delays or maths, can also be stored in libraries and reused very easily.

Comments

Popular posts from this blog

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 wil...

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....

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...