Hello,
i recently designed a PCB with an Atmega 32u4 on it. Now after the big excitement to finally have the
finished product in my hands i went to burn a bootloader on it. Trying to set the fuses or burn a bootloader
with avrdude and an usbasp however gives me the error:
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
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.
this is only my second time dealing with a blank chip and the first time went roughly the same
but there it was due to me forgetting the resistor between the HWB pin and ground and it worked after adding that. Now this time i made sure to wire up the Atmega the same way i did with my working board and i also checked that the connections between my usbasp and the chip were good but it's still spitting out the same error.
After a long google search, i understand that this error is almost always due to some error in the electrical design but i can't seem to find it.
Thus i would super much appreciate if someone could give me a hint on what to check or what i messed up with my schematic.
(circuit schematic and avrdude errors are attached)
(the somewhat weird resistors are due to a lack of ones with proper values)
Okay i actually got a lot further.
Out of desperation i started checking the usbasp and found out that a solder joint
on the mosi line broke which i did not consider in the 3 days i am on this now but apparently it
was half of the issue as now i can burn bootloaders and set fuses over cmd.
(thus solving my problem, i am really sorry for this lengthy post i did not expect to solve it that quick after posting or even at all on my own) Now in the arduino software, it still does not want to let me burn stuff but i suspect that might be more of a software issue which i feel much more positive about solving myself.
Again i am super sorry about first posting and then finding the solution myself should have checked everything in before.
I had two thoughts in rapid succession regarding your trivial solution "Oh man, it was so frustrating when I would waste days and it was just some problem with equipment"
"Say.... that hasn't happened to me in ages has it? I think the last time a flaky USBAsp or USBAsp ribbon cable (have had several bad ones! I don't uise tjhe ribbon cables anymore - with handling, the connection fails where the blades go through the insulation and engage the wire)), or one of the problems with dodgy firmware on a USBAsp USBTinyISP was a problem for me was.... before I bought like half a dozen each of USBTinyISP and USBAsp, and wired iup several; dedicated jtagi2updi nanos...
That's the fix - when the flaky equipment is cheap, buy it in triplicate or more. By now I have well in excess of a dozen ISP programmers. at least 4 hardwired jtag2updi boards. (as in nanos with the wires soldered to them so I don['t forget which ones have jtag2updi on them, and I don't have to deal with bad connectors. I'm getting mighty frustrated with the durability of dupont pins. the problem is that I make nice cables to go between part and programmer (fluorescent color braid cable wraps (so I can find them by panning a blacklight flashlight across the room), with the ends held on with the kind of heat shrink tube with the "thick glue", I get dupont line with the female pins installed, but no connector housings on aliexpress, and then assemble them as needed. But the female dupont connectors are have a finite lifespan. I have two ending in a group of pogopins where I soldered the female pins onto the end of the pogo pin receprtacle, because I kept having unreliable results with them, like it mattered how I held it :-/ (connection from cable to pogopin receptacle was the weakest link!)
The other thought was "You think that's bad? Wait until you have a bad solder joint under a SMD pin., such that when you are probing it with a multimeter, that pushes the pin into contact so it tests OK!