Hi, everyone.
I have some Atmega328P-PU with preinstalled Arduino bootloader.
If I mount them on an Arduino UNO I can program them from Arduino IDE via the UNO USB. So they work and the bootloader is actually installed.
For a project, I want to use them with a lower clock, so using the internal 1MHz. So, I need to se the fuse registers.
Since I don't have a breadboard setup, I hoped to do this by connecting the USBASP programmer directly to the Arduino via the ISP pins.
Awfully, the IDE gives me this error:
avrdude: error: program enable: target doesn't answer. 1
What I tested so far
I have an home made "programming board", where I can connect the USBASP ISP signals to 3 type of AVR (8 pins, 20 pins, 28 pins). No crystals; it will work on standard processors, working with internal clock.
Using USBASP + avrdude I was able to communicate (read/write the fuse) to a ATTiny85 (8 pins) and an Atmega8l (24 pins). So, USBASP works, and the programming board is wired correctly.
I couldn't communicate with the Atmega328P. I bought them several years ago, and didn't remember if they had a bootloader.
I connected one to the Arduino UNO and, as sid, I was able to program it with the Blink example.
I confirmet that they have the bootloader preinstalled. That explains why I couldn't communicate with them on my programming board (no external clock provided).
I then connected the USBASP to the Arduino UNO. I connected the 6 used pins with 6 "floating" cables (not a premade cable). I've checked three times that everything was connected as expected. When connectin USBASP to the PC USB, the UNO turns on and the Blink program loaded to the micro runs. At least ground and VCC are connected corretly
THe other signals are connected 1:1 (MISO to MISO, MOSI to MOSI, ...).
I've installed the breadboard sketch (copied the folder in Arduino/hardware). I then selected "ATmega328 on a breadboard (8 MHz internal clock)" as target board and USBAsp as programmer. Then Sketch->Upload Using Programmer.
And got the mentioned error
Awfully, the IDE gives me this error:
avrdude: error: program enable: target doesn't answer. 1
I get the same error launching avrdude from cmd to read the fuse bits. I expect it to work once the processor is mounted on the UNO (external oscillator available).
On the USBASP I connected the jumper to hawe it work at 5V. Also tried connecting the "slow clock" jumper, without success.
Am I missing something?
Any hints to be able to program the Atmega328 (with bootloader) with USBASP? If I can avoid setting up a breadboard and use the UNO I'll be grateful ![]()