For a project I've designed a PCB using the atmega-328p chip. I have exposed probe points on the PCB so I can test for shorts , voltage levels etc using a jig and another atmega328-p on a jig.
I also know that the atmega328-p can be programmed to act as a programmer itself and if I can use one chip to both program the MCU in circuit AND do the debugging it would be a lot faster and more convenient than what I'm doing right now: using a QFP to DIP socket, programming the chips one by one and then soldering them on the final product. I'm just not sure if altering the code of the "Arduino as ISP" which makes it able to burn boot loader and program another chip, will cause some sort of errors ... I suppose I can have 2 jigs: one for programming and one for debugging but it would be great if I can just use one to speed up the process.
If you know how the "Arduino as ISP" sketch works or if I can modify it without breaking it, please let me know. I tried going through the code but it's very long and I'm not really sure what a lot of the lines do.