I'm currently working on a project that involves multiple Atmega devices. I'm planning to leave ISP headers on the board, but I don't want to leave 1 set of ISP headers for each chip (I'll have 4-5 of such chips). But instead, I'm thinking of cleverly placing jumpers and headers as to "select" the device being programmed. This way I get to use only 1 set of ISP headers.
My question is which ISP line can I select for muxing. ISP lines consist of the following
VDD
GND
SCK
MISO
MOSI
Reset
My guess would be if I disconnect SCK line for the 4 devices that I'm not programming, but connect this line user a jumper for the device that I am programming, then I end up with programming this 1 target device. Is this a feasible idea?
Best Answer
Ideally you would MUX the whole lot, but i understand if this is not feasible.
I think you are right to use the SCK line, but make sure that the disconnected lines are not floating. Crosstalk on a floating line could cause problems.
The Atmega chips program when reset is LOW. When in Reset, the chip is listening for programming instructions on the SPI port.
Here is how I would tackle it:
The risk here is that the chip in reset will drive the MOSI line, but i dont think it will. Check this first.