Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm going to use MISO/MOSI/SCK pins of 8 bit AVR with ISP and they should connect to shift register. They are not going to work simultaneously, but the question is how to isolate register from ISP?


enter image description here

U7 is ISP header. U1 is ATTiny45/85. U2 is LED display with shift register M512RD, but I'm mostly sure that the question is more conceptual and doesn't require exact parts.

share|improve this question
Could you please provide a bit more detail, and perhaps a schematic and links to the specific parts you are referring to? – Anindo Ghosh Jan 17 '13 at 12:53
@Anindo Ghosh: done. – Pablo Jan 17 '13 at 13:04
I see only SR inputs, no outputs. I assume you don't care what the display shows while programing, so why would you want to isolate the SR inputs from being driven by your ISP? – Wouter van Ooijen Jan 17 '13 at 13:39
@Woutervan Ooijen: Yes, I don't care about diplay while programming, but my concern is can display somehow disrupt programming? – Pablo Jan 17 '13 at 13:45
If you are going to be actively driving against them, I'd try to avoid a resistor below 1K. Unless you data rate when talking to the display is quite fast or your routing long and intricate, that's not likely to cause a problem in operation. One thing you can do is test it with a resistor several times larger than the one you plan to use - if it still operates reliably, you should generally have some safety margin when you cut back to the intended value (provided you are still on the same side of the characteristic impedance, which in the kilo ohm range you would be) – Chris Stratton Jan 17 '13 at 18:16
up vote 4 down vote accepted

The Atmel MCU itself will generally work just fine with this type of connection. The reason being is that the SPI connection from the six pin connector is used for programming whilst the AVR is held in reset. In that mode the regular functions of the SPI controller are disconnected internally and are tristated.

You would need to provide a bit of isolation for any of the SPI signals that may be driven by the external circuits on your board. In this specific case it does not look like any of the shift register signals are used as an output to drive back to the AVR and so no additional circuit isolation should be needed.

share|improve this answer
I'm not using SPI itself, just bit-banging through GPIO. I've found this note from atmel: AVR901 (In-System Programming): "To avoid driver contention, a series resistor should be placed on each of the three dedicated lines if there is a possibility that external circuitry could be driving these lines." But I don't see the value of resistor. – Pablo Jan 17 '13 at 13:47
@Pablo - Like I said, from peering at your schematic, the three signals DATA_EN, DATA_IN and CLOCK_IN all appear to be inputs to the display circuit. If that is the case the display will not be driving the lines during the ISP operation so there should be no need for any isolation resistors or other types of isolation components. – Michael Karas Jan 17 '13 at 13:56
Regarding the resitor value, we use 1k and never had problems so far. But this probably depends on what you are "driving". – Rev1.0 Jan 18 '13 at 10:29
Yes, The resistor value needs to be selected as a trade-off. Since it is in series with some signal driven from the board into the AVR the series resistor will tend to round off the signal edges from the onboard device during normal operation. So you try to minimize the value to reduce this effect. On the other hand the resistor must be large enough to limit current in case where onboard device is holding signal high or low and the driver in the SPI programming pod wants to (cont next comment) – Michael Karas Jan 18 '13 at 15:04
(cont from prev comment) source or sink current to pull the signal to the opposite level. You try to make the resistor large enough so that the SPI pod driver is not overloaded. – Michael Karas Jan 18 '13 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.