I assembled a ATmega328P-AU on a board, with power, pull-up resistor on reset, a 16 MHz resonator, and an ICSP connector. I want to burn the Arduino Uno bootloader with AVRISP mkii, but it fails.
When I power the circuit and connect the AVRISP, the LED that lights green, indicating that the connection is ok. In Arduino 1.0 IDE, I select AVRISP mkii as programmer, and Arduino Uno as board. When I try to burn the bootloader, I get the following:
avrdude: stk500v2_command (): command failed
avrdude: stk500v2_program_enable (): bad AVRISPmkII connection status: 0x00 Unknown status
avrdude: initialization failed, rc = -1
Double check connections and try again, or use-F to override
this check.
I have checked the circuit and it seems all right. Well, all I can not check is the frequency of the resonator. I tried to do the same process without connecting an external clock, hoping to work with the internal, but the result has been the same.
Given that the micro is received from factory, under what conditions should it be burned with the Arduino bootloader? With external clock? Internal? A parameter to be changed? I have searched and readed much, but I have not found the solution.
I seem to recall successfully uploading stuff to my "bare bones" board when only the 8 MHz oscillator was enabled. It wouldn't be much use if they were sold in a state that couldn't be programmed using ICSP.
I attach the schematics. I've assembled two boards, and tried too with AVR Studio. The micro is not detected. The programmer works fine, it reads the signature of the micro in an Arduino Uno, for example, but fails with my boards. Have I broken 2 micros?
Your schematic does not match what you wrote in your first post. In your first post you state there is a 16Mhz resonator, but your schematic does not show it.
How about a picture of your setup, that would do wonders.