How put ISP program on atmega8u2

Some years ago I made simple PCB for atmega8u2 with USB connector, ISP header and similar header for ISP programming and somehow programmed this as ArduinoISP programmer.

When connected to USB it was reported as Atmel Corp. atmega8u2 or something like that.
When ISP cable from the second connector was put into clasic Arduino's ISP header, the other Arduino could be programmed via it (with programmer set to ArduinoISP) .
It just worked.

Now I accidentally reprogrammed it and lost the code. And I cannot find, how I set it so many years ago. I can program it via USBasp programmer without problem, but I do not how to fit ArduinoISP.ino on it, as it needs like 6k Flash, while I have just 4k of flash free (with bootloader) from total 8k

Can anybody help me?

A bootloader takes up 4K on the 8u2? Really?

In any case, did you perhaps put the sketch on the 8u2 w/o the bootloader? The ArduinoISP sketch is only slightly more than 4K itself.

The native USB bootloaders are "large." (except for Teensy!)
Uno used to have an 8u2 as the USB/Serial converter, but they upgraded to a 16u2...

1 Like

I won't die today; I learned something new. :slight_smile:

I'm still leaning towards the sketch originally having been put on the 8u2 via ICSP and not having the bootloader in there at all.

Yes, the bootloader took 4k, so normal ArduinoISP, which needs something over 6000 bytes would not fit.
Now I remove the bootloader, reset fuses and had enought flash for it and it looks like it fit there.
Next I need to obtain some Arduino with ISP head and try to program it with it, to prove it was really success. But it will take some time.
Thank you for turn me the right direction.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.