Trace: » start » eclipse » various » classes » pointers » oop » mupe » subversion » sdl » avr_c

Programming Atmega168 with ISCP Programmer with AVRDude and Avr-gcc

Warning! This is really a cumbersome project in general. Arduino is pretty much there and it gives a lot of the possibilities that can be done with avr. It has a nice programming interface both hardware and software wise.

First of all you can download a package containing avrDude, avr-gcc, libUSB(which is cruicial if you are using avrisp MKII programmer on Mac OSX) all at once from here. Arduino also comes with its own package so you can use that libraries as well.

Couple of important things. avrDude is an open source software programming tool for AVR. If you are using windows, you can go with AVR Studio which is free from Atmel Corp. I must say there is a huge difference between those two softwares. AVR Studio is much more powerful with its GUI and Debugging interface. It gives you quite on spot errors which reduces your debugging time.

Gcc-avr is an open source C compiler which is pretty much we need on the programming side.

I am using avrisp mk2 for my programmer. I bought it from Digikey for $30. + plus shipping. The SPI connector’s description is below:

For the programming side I followed Stefan’s guides and they worked for me like charm. You can find them |here.

Couple of things to note: My programmer is an usb programmer which means when you list it with regular ls /dev/tty.* you are not going to see it shows up in the list. In order to make it work you have to use this line instead when compiling your code for it:

avrdude -F -c avrispmkII -p m168 -P usb -v -U blink.hex