I am trying to connect to an ATmega328 on a breadboard using a USBasp programmer. I have successfully connected to an Arduino uno using this programmer and avrdude, however the methods are not translating to my breadboard set up. This is the error resulting from the following command:
avrdude -p m328 -P /dev/ttyS1 -c usbasp
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
I understand this is most commonly the result of incorrect wiring—I have checked and double checked the wiring, which seems to be in order.
On the USBasp header, male pumpers are attached as follows (see the photo for breadboard wiring.)
The voltage across the gnd/VCC cap is a steady 5.06V
Additionally, i have an ATmega168A and ATtiny45 which have brought me to the same error. Notably, it was a bit challenging to snap a couple of these chips into the board; the only thing i can surmise is that there are one or more faulty connections within the breadboard to my programmer pins.
Thanks for any help!
***UPDATE: I am now communicating with the MCU. I soldered a jumper to JP3 of my USBasp, which slows the programmer clock speed. From USBasp documentation:
"J3 SCK option If the target clock is lower than 1,5 MHz, you have to set this jumper. Then SCK is scaled down from 375 kHz to about 8 kHz."