Installing and Using WinAVR for Parallel Port Programmer

Installing and Using WinAVR for
Parallel Port Programmer
After successfully designing the Parallel port programmer in our previous tutorial, now we will be learning how to install and work on the software for programming the MCU.
WinAVR– WinAVR is package in which we use two sub-programs
Programmers Notepad & Mfile.
Name - Programmers Notepad & Mfile
Version- 2.0.8.718-basic
Creator- Simon Steele
Purpose- 1. To write code.
2. To compile code.
3. To generate Hex File.
4. To burn Hex File.
Installing WinAVR:
1. Download WinAVR setup from this link:-
2. Install WinAVR into C:\ WinAVR-20090313
3. Now go to Start-->Run-->(cmd.exe), i.e. go to command prompt.
4. Go to the following directory C:\WinAVR-20090313\bin.
5. Type this command “install_giveio” and press ENTER.
6. You should get the “Success” message as shown in the snapshot below.
5. Check the status by the command “status_giveio”.
6. Installation of WinAVR is complete now.


Screenshot of Command Prompt Window (CLick To Enlarge)


Screenshot of Programmers Notepad (CLick To Enlarge)
Steps for Compiling and Burning Process-
1. Open Programmers Notepad [WinAVR] from “StartàAll programs à WinAVR-20090313”, write the code. Save the program into a specified folder whose name is same as the File name.
2. Open MFile [WinAVR] from “StartàAll programs à WinAVR-20090313” apply following steps-
I. Select Microcontroller type which is Atmega16 or Atmega32 whichever you are using.

(CLick To Enlarge)
II. Select output format as “ihex”.
III. Select Debug format as “avr-ext-COFF (AVR Studio 4.07+, VMLAB3.10+).


(CLick To Enlarge)
IV. Select programmer option as “bsd”.
V. Select output port as lpt1 because we are using Parallel port (0X378 is the address of Parallel port).
VI. Save As the file as Mfile format in the same folder where the program file is saved. Name of the Mfile should me kept Makefile only; don’t change it to any other name.
VII. Reopen the saved Mfile in Notepad.exe and correct F_CPU to 1 MHz and write the target name same as Program file name. Save the Mfile.


(CLick To Enlarge)
3. Open programmer Notepad select Tools à[WinAVR] Make All option to compile and create hex code Hex code.
4. After successful compilation the hex file is saved automatically into the same folder in which the program file and the Makefile are already saved.
5. Connect parallel port of burner to the CPU of your PC and select Tools à[WinAVR] Program option to burn Hex code.
6. Below is the snapshot of the output window which displays all the actions being taken and their status.


(CLick To Enlarge)
COMMON ERRORS ENCOUNTERED
First Error
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
make.exe: *** [program] Error 1
Second Error:
avrdude: Device Signature=0xffffff.
avrdude: Yikes! Invalid device Signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
make.exe: *** [program] Error 1

TROUBLESHOOTING
1. First check whether your parallel port is working or not using lpt.exe.
2. See bios settings. Better set for bidirectional mode, but spp and ecp modes will also work. See the address of the parallel port (0x378).
3. You connected reset pin to external Vcc or GND ( disconnect it)
4. External power supply may be off.
5. Parallel port cable may be not fitted properly.
6. See whether u interchanged MISO and MOSI.
7. See for short-ckt between pins.
8. See for any loose connection in wires using Continuity tester of multimeter.
9. Ground of power supply and parallel port should be short circuited.
Enjoy working with AVR now…
Share on Google Plus

About sNova

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment

Thanks for your Valuable comment