Using ICSP Header on customised board

Hello,

I'm currently building my own board using ATmega328. Since I don't want to program the MCU via FTDI I'm leaving the ICSP pins to program it using an AVR programmer instead.

My question is: I'm currently using this pins for other functions (basically they are used on a multiplexer, 3 of them as a OUTPUT and the other one as INPUT). Is there any problem with this? What cautions do I have to make?

Thanks!

You can easily design in removable jumpers to disconnect the I/O.

.

It depends on what these pins are connected to. If they have resistors connecting them to either power rail, or connected to a large capacitance like a big MOSFET, it may interfere with communications. Otherwise, they will probably be fine if they are just low-current communication signals.

You have to think about how your circuit works.

As an example, I have a board that I program with ICSP. The SCK, MOSI and MISO lines go to three different SPI devices. So what happens when I'm programming? Those three lines are all active and being driven by the programmer (SCK and MOSI) and the the processor (MISO). The SPI devices ignore them as long as their chip select lines are held high. So I had to make sure that the CS lines had pull-ups to prevent the devices from listening to MOSI or trying to drive MISO. Two of them had internal pull-ups and the other I had to add an external resistor. Without that last pull-up it wouldn't work.

LarryD:
You can easily design in removable jumpers to disconnect the I/O.

Which is to say, you have the 6-pin header for ICSP, but on either side of it you have extra header pins to which you use jumpers for the other pin functions; to program you remove those jumpers and can then fit the 6-pin programming socket.

Other than that, there are two considerations. If you are using those pins as outputs, then you merely have to ensure they are minimally loaded by whatever they are connected to, at least 4k7 resistance - digital logic inputs are fine, LEDs are not. If using those pins as inputs, simply connect a 10k resistor between the source and the pin in question.

The final consideration, is that the signals used during programming - or lack of such signals if they are isolated, will not cause a malfunction to the other circuit systems.