Need help programming Atmega328-AU with avrdude and USBtinyISP!

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
jinx6672
 
Posts: 1
Joined: Fri May 11, 2012 3:05 pm

Need help programming Atmega328-AU with avrdude and USBtinyISP!

Post by jinx6672 »

I need help programming Atmega328-AU with avrdude and USBtinyISP!
I have tried using the Arduino IDE but I couldn't find the pins_arduino.h file for the 328P-AU. Now I am trying to use avrdude and it doesn't reference the 328P-AU either. what files do I need or create to make this happen.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Need help programming Atmega328-AU with avrdude and USBtinyISP!

Post by adafruit_support_rick »

The 328P pinout is the same as the 328, which is what is used in the arduino. You shouldn't have to do anything special.

BillO
 
Posts: 7
Joined: Tue May 08, 2012 9:44 am

Re: Need help programming Atmega328-AU with avrdude and USBtinyISP!

Post by BillO »

The 328 has a different device ID than the 328P. Either create a section in avrdude.conf for the 328, identical to the section for the 328P, except using the correct device ID, or use the -F switch on the avrdue command line like this;

avrdude -pm328p -cusbtiny -Ulock:w:0x0F:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m -Uefuse:w:0x05:m -V -Uflash:w:ATmegaBOOT_168_atmega328.hex:i -u -F

Which will program the chip with the Arduino Duemilanove bootloader. Just change the "ATMegaBOOT_168_stmega328.hex" to the name of the file you want to use.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”