The basic setup is like here → http://arduino.cc/en/Main/Standalone except I do not have the 16Mhz crystal, SKU BOB-08508 or the FT232 breakout board. I have the AVR USB Programmer mentioned before connected as follows:
There is a steady 11.75 volts feeding my breadboard where is is regulated down to 4.95 volts to feed the breadboard.
The green light on the programmer is steady except for a few flickers after trying to initialize upload of the bootloader. The yellow LED has a steady flash slightly less than a second.
I have quit the Arduino IDE and edited the boards.txt to reflect the lack of an external crystal to the atmega328.build.f_cpu=8000000L instead of the original 16000000L. This made no difference.
I also have other Atmega328P-PU ICs that are also new with the same results.
I can connect to the Atmel328P-PU with Atmel Studio 6.0 and retrieve data from the IC after lowering the ISP clock to 57.6 kHz. Device Information
Detected device
Device name ATmega328P
Device signature 0x1E950F
Datasheet information
ATmega328P
CPU 8-bit AVR
Flash size 32 Kbytes
EEPROM size 1 Kbytes
SRAM size 2 Kbytes
VCC range 1.8 - 5.5 V
Maximum speed N/A
Since you can connect to the Atmel328P-PU, it is a good sign your basic setup works. Your problem is likely in the settings you chose in the Arduino IDE.
You might check to see if you are using the correct COM port. Also, it would be helpful if we knew what the actual AVRDUDE command is, (the Arduino IDE usually doesn’t tell you). Could you use just AVRDUDE instead and tell us the exact command you typed?
Please post a picture of your connections, what version Arduino IDE you are using and what your settings are for the Board, Programmer and Serial Port.
I can program and read to/from my Baby Orangutan B-328 and read from the Atmega328P-PU with the USB AVR Programmer so I don’t believe it is a defective USB AVR Programmer.
The programmer is using Pololu USB AVR Programmer Programming Port (COM3).
The Arduino IDE is as follows:
Version 1.0.3
Board = Arduino Duemilanove w/ ATmega328
Serial Port = COM3
Programmer = AVR ISP
Avrdude returned: avrdude: stk500_getsync(): not in sync: resp=0x00
From the USB AVR Programmer Utility:
ISP Frequency = 4.0 kHz
minimum voltage = 4832 mV
Error From Last Programming:
The SPI command for entering programming mode was sent, but the expected response from the target was not received. Make sure that the ISP frequency setting is less than 1/4th of the target’s clock frequency.
I still haven’t been able to get a bootloader to upload to the Atmega328P-PU, but I did get a simple blink program to upload by using Atmel Studio and pre-compiling the program, then opening the Device Programming (On the Tools menu), selecting the proper programmer and IC then changing the ISP frequency to 14.07 kHz. I then selected “Memories”, loading the pre-compiled blink program and uploading it from there. Only thing is…it operates at 1/4 speed. The internal clock must be WAY OFF! I am ordering crystals and going external for the clock.
I will try changing the m128 to m328p as well, but I think my biggest issue is the internal clock rate.
Upon waking this morning, I checked the datasheet for internal timing and sure enough…the CKDIV8 selected means that the internal clock is at 1/8 speed.
From the datasheet (p. 27):
I deselected the CKDIV8 and applied the changes. Immediately my blink program was running at a speed which I thought it should have been.
I could have saved a lot of time by reading the datasheet. Too bad it’s so dry to read.
I have not had any success uploading the bootloader to the 328P and now i have Atiny85 and still cannot upload a bootloader to it either. The programmer works fine for uploading programs and reading from the ICs, but will not upload a bootloader. Any suggestions or clarifications I can make?