What sketch size on Arduino Pro Mini 8Mhz with an ISP-programmer?

UPDATE: how to fix troubles/problems if the USBasp won't upload the sketch.

Check 1 - wrong programmer?

After the selection and configurating of the right Minicore board (see posts above), be sure that the right

tools -> Programmer -> USBasp

My selection was still on "AVRISP mkII" :-[

Check 2: connector plugged wrongly?

Be sure that the wiring from the IDC-10 connector to the Arduino pins is correct. Double check it, after that check it again.

Please note that a lot of wiring diagrams on internet are wrong just because the guy didn't plugged the IDC-10 into the USBasp board correctly. So the pin 1 of the board do not correspond to the wire with the red color on the connector-stripe.

If you bought (like me) an USBasp with the connector pointing upward, then the right way to plug the IDC-10 is the one shown in the photo below, i.e. with the red wire connected to the pin 1 (pin 1 is always VCC).

Also, the right wiring of the connector at the other end is the one shown here.
Please carefully look at the second (unfocused) photo, that is the key. Note also the position of the red wire on the stripe relatively to the flat surface of the IDC-10 connector.

Trouble 1: no permissions on the USB?

After issuing the command Sketch -> Upload using Programmer, the upload fails because the IDE states that cannot find any device attached to usb/tty0 (or whatever), even if you can select that usb in the Tools -> Port menu:

avrdude: Warning: cannot open USB device: Permission denied
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

This is a problem of permissions in Linux. The solution is available here.

Trouble 2: no answer from the programmer?

Again, the IDE won't upload because this error message:

avrdude: error: program enable: target doesn't answer. 1

If you're using a "slow" Pro Mini at 8Mhz (like me), then Thomas Fischl (the creator of the USBasp) suggest here to bridge the jumper J3. This will slow the clock of the USBasp too.

Trouble 3: avrdude: verification error, first mismatch at byte ......

Try to plug the GND cable to a different ground pin of the IDC-10 connector.

There are four position labeled as ground pins on the connector, they should be all the same but seems they are not. I just switched the GND cable from pin #10 to #8 and the uploading of the sketches has started to work again.
When/if I plug back the cable to the previous position the verification error comes out again.

Now my USBasp uploads sketches like a tornado! Ciaoooo! :smiley: