Dear friends,
I bought a new Atmega168-20PU and tried to program it with my USB programmer using the Arduino IDE and got this:
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
It happened to me before when I made wrong connections, but this time I checked and triple checked the connections, the selected board and everything is ok. The programmer is ok, I succeeded in programming an Atmega8 and an Atiny2313.
Curious thing: last week I was working with another Atmega168 and, suddenly, I received the same error. I assumed that I burnt the chip and threw it away, but, considering that I get the same error weith a new and identical chip, it makes me wonder. What could be the problem?
Well you might try providing a clock signal to the chip to see if that is what it needs as unless you read and decode the fuse bits you are assuming the chip is set up for internal clocking a 1 Mhz via it's internal 8 Mhz RC clock and a /8 pre-scaler set ( I believe that how they are suppose to be shipped from Atmel ?) and that may not be the case?
You mean place an external oscillator between the XTAL pins and two capacitors to the ground? i did that using an external 4 MHz and two 22pF capacitors and the results is the same. Is there other way to accomplish what you suggested?
I also tried reading the fusebits with Khazama and the results is the same: nomcommunication with the 168, like it is not functional or the connections are faulted.
claudiu_mirescu:
I also tried reading the fusebits with Khazama and the results is the same: nomcommunication with the 168, like it is not functional or the connections are faulted.
Well if you tried an external clock then I'm out of ideas. It's very hard to differentiate between a possible faulty chip or a possible fault set-up and/or procedure.
Curious thing: last week I was working with another Atmega168 and, suddenly, I received the same error. I assumed that I burnt the chip and threw it away, but, considering that I get the same error weith a new and identical chip, it makes me wonder. What could be the problem?
Did you check the voltage of your power source? (Should be max 6V.)
A photo of the setup may help identify a wiring issue.