Blinking LED Tutorial

Introduction:

This is the first project with a microcontroller and also a beginner’s guide to AVR microcontrollers. Basically what we do here is tie a couple of Light Emitting Diodes to microcontroller pins, connect it with a computer, program it and finally see them blink.  Further we will see the different ways to make them blink, learn how to fade them etc.

This is similar to what we achieve in any "Hello World" program and I assume that you are already familiar with Microcontroller and AVR basics. If not, suggest you to go through AVR basics, Microcontroller basics and return.

Tutorial index:

  1. Parts List: 
  2. Electronics:
  3. Breadboard-Programmer Setup:
  4. Programming:
  5. Blinking LED:
  6. Bitwise Operators:
  7. Assignment Operators:
  8. Bitwise Shift Operators:

Parts list:

Parts List

The parts are of course expensive for this project. You may question the need to spend so much for a blinking LED. Instead, you can purchase a set of blinking LEDs for a fraction of this cost, connect it with a battery and resistor; make it blink. But what you cannot do is control them. You cannot make a LED switch on for 10 seconds and then switch off for another 5 seconds, or whatever period you choose.

Also the parts mentioned here can be reused again and again. The programmer which might burn your wallet is still a decent investment. Once you purchase / build a programmer, it is almost a lifetime investment (unless you burn it or destroy it for some odd reason).

The hardware requirement is complete. The software required is freely available over the web. Refer to Software requirements tutorial and install all software in the same order mentioned.

Do you have anything to say?
Visit the Forum to discuss, learn and share anything related to robotics and electronics !!

rss feeds



Featured Videos




Advertisements


Recent Articles




Atmega8 Development Board


A great step-by-step tutorial on building your own Atmel AVR based Atmega8 development board. The board is ideal for beginners with detailed explanation and pictures More...

L293D Motor Driver


For robots to do work, you need to know how to control a motor. L293D is a cleverly packed IC which can control two DC motors in both directions: forwards and reverse. Here is a detailed explanation of building a board based on L293D ICMore...

Hobby Servo Tutorial


Servo Motor is a device which uses error-sensing feedback signals to determine and control the position of a motor shaft. The term "servomechanism" closely relates to servo motors..More...

Blinking LED Tutorial


This is similar to what we achieve in any "Hello World" program. However, it is not just limited to blinking LED but scratches the surface of AVR-GCC programming... More...


Kindly Donate

If this site has helped you, then kindly consider a Donation to say "Thank You!!". Donation might help us keep all this information available for free and also pay for the resources.

If that is difficult, then a simple "Hi" in the forum would still do good :)