I am a real newbie trying to build my first simple 50$ Robot following the tutorial from Society of Robots. I have (magically) soldered up the electronics needed and I have uploaded a simple "servo centering" program to the ATmega328P microcontroller using the Atmel AVRISP mkII programmer. The first times it actually worked fine, but after changing the pulsewidth in the code a couple of times it suddenly doesn't work anymore. I get the message:
"Setting mode and device parameters.. OK!
Entering programming mode.. FAILED!
Leaving programming mode.. OK!"
I also get a pop up saying the ISP frequency should be less than 1/4 of the clock frequency which it is!
When I google the message I can see that many other have had this problem also, but I have not been able to solve the problem... Maybe because I don't fully understand the nature of the microcontroller, programmer etc. However I have tried to change the ISP frequency to all the possible values with no luck, but I haven't tried changing any other settings (don't know what I should change either). The target voltage also reads 5.0 V which should be okay.
I really hope you have some ideas I can try before ordering a new chip or adding an external oscillator, if I maybe have got the microcontroller locked? For your info I have upgraded the newest firmware to the programmer and I am running AVR Studio 4.18.700. I you need any other information about my setup please ask.