Hello & welcome to the first tutorial on AVR
This tutorial is focused on imparting basic AVR knowledge to folks interested in beginning in embedded systems & robotics.
The very first post is on the "HELLO WORLD" in robotics (specifically AVR).
I'd suggest you kindly clear your basics of digital electronics before starting this tutorial.
Also learn to read data sheets of basic IC's such as the following:
- 555 timer.
- max232
- opamp 741
- lm35
- adc0804
- ATtiny
& our first microcontroller ATMEGA 16.
FOR beginning the set of tutorials, we'll download "WINAVR setup" & install it onto the desktop. & open the PROGRAMMER's NOTEPAD.
FOR beginning the set of tutorials, we'll download "WINAVR setup" & install it onto the desktop. & open the PROGRAMMER's NOTEPAD.
1) select file->new->c/c++ file to compose your first AVR program |
2) write the given program & save it at a desired location in a separate folder |
3) Now find the makefile & edit it. |
& Now , moving on to our next software Proteus. Its an animated software simulation method of your circuits.
Google this Software. You'll find plenty of good download links with FULL SETUP (SOFTWARE + CRACK+ LICENSE KEY). So Download & install the setup using the "HOW TO TEXT FILE".
Google this Software. You'll find plenty of good download links with FULL SETUP (SOFTWARE + CRACK+ LICENSE KEY). So Download & install the setup using the "HOW TO TEXT FILE".
7)Using the part list library within Proteus. Make the connections & Construct this basic circuit. |
8) Save the design file for your ease in the same folder as your AVR project folder. I advise you make a folder for each project in the coming tutorials & save it with the title name of your project. |
eg. : LED_BLINKER_TEST folder
> LED_BLINKER.c
>LED_BLINKER.hex
>LED_BLINKER.dsn
>makefile
>LED_BLINKER.hex
>LED_BLINKER.dsn
>makefile
10) Now after adding the Hex file to design. click Execute & the click on the green Play button on the bottom left to Simulate. & use pause/play/stop button as & when you require. |
Next, we'll Focus On BURNING the program to a real hardware using AVRDUDE .
Open AVRDUDE GUI & make the following settings:
i.e set your controller(we are using atmega16), programmer/burner (i am using usbasb), com port(check for ComPort by looking into the device manager for New hardware. This will pop up everytime you connect a new controller/device to your pc ), high fuse & low fuse.
Select the hex file & execute.
As my device is not connected to the machine. you see the message below.
when you connect your device , you'll see it in the device manager. while programming, select the same COM PORT (COM3 in this case ) while programming. |
You may use a common AVR burner hardware & connect the controller on a development board or breadboard & program the controller to see the led connected to C- bit 1, blinking.
For all of you who are yet confused about the fuses , i'll do a separate comprehensive tutorial on
- AVR FUSES of some common AVR controllers.
- TIMERS /DELAYS & INTERRUPTS
- SERIAL & PARALLEL COMMUNICATION
Also feel free to ask any doubts regarding the projects.
-Abhirup :)
very helping sir....
ReplyDelete