I'm designing a home automation board with ATmega328. For programming it I'm exposing the appropriate pins via the AVR ISP interface. Now some ICs of the board allow only up to 3.5V power. What are recommended ways of preventing damage when using a 5V programmer? I have several ideas, neither of them perfect:
Always use a modified 3.3V programmer. But it's easy to forget and damage the board by using a standard 5V one.
Still, there are possible issues:
- If the jumper isn't switched before programming, the MCU will be unpowered, while the programmer will attempt to communicate with it's data lines. That can potentially damage the MCU.
- I'm not very happy with routing power to anything via jumpers.
Incorporate a level-shifter and always power the board before programming. This makes the design more complicated, although it's probably the cleanest solution.
Which of them, or perhaps yet another, would be recommended?