bare minimal m328p with internal 8mhz oscillator

Hello,

I have a brand new atmega328p without external crystal solded in a pcb with a ISP connector towards it. I plug the connector in my usbasp and absolutely nothing works:

avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: error: program enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

Then i start to get crazy.

Can someone confirm me that the only way to communicate/burn the fuses/program the chip is putting an external clock source on Xtal1?

I'm pretty sure this is caused by the USBasp programmer is a bit too fast for a stock 1 MHz AVR. It's a known issue. What you need to do is to divide the clock down.

On most USBasp programmers this can be achieved by shorting the J3 jumper close to the USB connector.

If not, you can do a manual install of MiniCore. After this, you can use the USBasp slow (MiniCore) programmer option, and it will probably just work. The reason why you can't use the current boards manager version for this is that I just added "slow" programmers, and haven't done a new release after this.

No matter what you choose to do, MiniCore is definitely the way to go if you're working with custom hardware that requires other settings that the default UNO settings have to offer.

finally finally finally finally finally finally finally finally finally finally finally finally

i went in your repo and found the magic number for the -B parameter

 avrdude -c usbasp -p m328p -B32

avrdude.exe: set SCK frequency to 16000 Hz
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude.exe: Device signature = 0x1e950f (probably m328p)

avrdude.exe: safemode: Fuses OK (E:FF, H:D9, L:62)

avrdude.exe done.  Thank you.

really, how was i supposed to know this? :confused:

I burned the new fuses and now i am successfully using platformio to upload to the board. Maybe some check could be added to platformio? :slight_smile: