I can't upload a project to my new Atmega328pu, which is clocked at 8MHz. I can reach it with the AtmelStudio over a AVRISP mk2 programmer, however when I try to upload a simple "Blink" program, I get a message like this:
Unexpected signature 0x001e0114 (expected 0x001e9514).
Sometimes I get this:
Verifying Flash...Failed! address=0x0000 expected=0x0c actual=0x6e
Just to be sure, here is my code:
#include <avr/io.h> #define F_CPU 8000000UL #include "util/delay.h" int main(void) { DDRB = 0b11111110; while (1) { PORTB = 0b00000100; _delay_ms(1000); PORTB = 0b00001000; _delay_ms(1000); } }