Electronic – USBasp programmer first firmware

atmegaavrmicrocontrollerprogrammerusbasp

I am building an evaluation board for ATmega32, I am designing an embedded USBasp programmer (The programmer will be also in the board and they will be a micro-usb header to connect the board to PC).
Here is the programmer I'll be using. (Note that it will not be separate like it appears on the image, it will be within the board, this is just to show you the components of the programmer)
USBasp programmer

I am wondering how I will be able to burn the first firmware for the programmer inside the programming chip above. I don't want to take out the chip, program it out then solder it back, I want to program it in board.
How I will be able to do so? (I have an external programmer but how I will be able to connect it?)

Best Answer

You could program it before you solder it in, using a ZIF socket programmer. If making many of the board, then your supplier can program them for you. ZIF socket programmers are available for QFN and MFN packages.

Alternatively you can provide an ISP header on the PCB, or equivalent pads for pogo-pins to program in circuit. Using just pads for pins takes up much less board space.

If it's a one-off prototype and you have already soldered it onto the board, you can also solder bodge wires from the pins of the MCU to a loose ISP header.