Position: Index > Unclassified >

Moving from PonyProg to AvrDude AVR programmer without pain

2017-12-23 02:57  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.

Probably PonyProg is one of the most popular programming software among AVR microcontroller developers. And this is OK as it is good software with very intuitive interface and support many chips like Atmel AVR, Microchip PIC micro, I2C, Microwire, SPI EEPROM. It works well with AVR ISP adapter which is ease to build. This is ideal tool for low budget projects.

The only thing what I don like with it, that I need to do additional steps to program AVR chip:

Compile project with WinAVR;

Open hex file with PonyProg;

Programm the chip;

Then I thought a€“ what if I could build and program the AVR chip with single button press. This is where AVRDUDE comes in.

AVRDUDE is a FreeBSD Unix program for programming Atmel’s AVR CPU’s. It can program the Flash and EEPROM, and where supported by the serial programming protocol, it can program fuse and lock bits. AVRDUDE also supplies a direct instruction mode allowing one to issue any programming instruction to the AVR chip regardless of whether AVRDUDE implements that specific feature of a particular chip. AVRDUDE can be used as a command line tool (convenient tu use with makefiles) or interactively via terminal. It can program microcontroller’s flash, EEPROM, fuse bits, modify individual bits, explore memory contents etc. For additional information refer to AVRDUDE manual.

Lets try to set up AVRDUDE to work in Windows environment. As I am using Windows XP I need to set up port drivers to enable AVRDUDE direct acces to ports. For this in a AVRDUDE package is handy tool included: install_giveio.bat which copies needed driver files to windows directory. For this just run:

Copying the driver to the windows directory
target file: C:\WINDOWS\giveio.sys
1 file(s) copied.
Remove a running service if needed…
Installing Windows NT/2k/XP driver: giveio
installing giveio from C:\WINDOWS\giveio.sys… ok.
starting giveio… ok.
set start type of giveio to auto… ok.

After this installation you can check driver status by writing command:

status of giveio:
Type: [0x01] Kernel driver.
Start Type: [0x02] Automatic
Error Control: [0x01] NORMAL: Display a message box.
Binary path: \??\C:\WINDOWS\giveio.sys
Load order grp:
Start Name:

When port drivers are set up, then wee can do couple fun tests with your AVR microcontroller via same AVR ISP cable that we use with PonyProg. No any changes is needed as this programmer is supported by AVRDUDE.

Just open console window and write command line:

C:\WinAVR\bi>avrdude -p m8 -c pony-stk200 -e -U flash:w:demo.hex


This command line programs your Atmega8 flash memory with demo.hex contents using simple AVR ISP adapter.

Well lets make this happen when building WinAVR project in Programmers Notepad editor. For this we need to prepare Makefile. The easiest way to do this is to use Mfile utility, where you can select programmer type and port:


You should have following results in makefile:


Thats it. Now is a fun part. If you have your project ready to run, just select a€?Programa€? command from Tools menu in PN:


This command builds your project and automatically sends hex file to AVR microcontroller automatically. In a future there will be more real world examples how this is working. Don’t afraid to read documentation a€“ al is written there;)

Good luck.

Reprinted Url Of This Article: