ICSP in 3v3 target (custom) board

Hi there,
I am trying to figure out the best practice for ICSP in a 3v3 board (no 5V devices at all)

In my current design I am using a Arduino pro mini (3v3, 8mhz) with one SPI device and a couple of I2C sensors. Everything is running at 3.3v. Design is working fine (still need to fix some little things in the code) and I am planning to design a custom PCB with all my components laid down.

My biggest concern is the ICSP of the atmega328(P) I am going to use as main microcontroller: is it possible to burn the arduino bootloader using only 3v3 signals? The SPI device I have to use, apart the atmega, is NOT 5V compliant. So I want to avoid burning it by feeding 5v via SPI lines.

My idea is to use another arduino as programmer: I have a seeeduino which can work at 3.3V (so all the signals from it will be 3.3v), and powering my custom board via its own supply (which of course will be 3.3v). I saw it is possible to program the arduino with 3.3v signals (example: via raspberry pi) so in theory my plan should work. Any contraindication? Or am I missing something?

Is there any other precaution I should consider? Should the other devices (everything except the atmega) be unpowered during ICSP or they can be powered? Of course my concern is the SPI device, the I2C should be just fine.... should :slight_smile:

Of course any comment or suggestion is well appreciated, thanks since now to who will help

Nicola

I don't see any worries with your approach. A couple things to watch for (and these are really independent of whether the supply voltage is 5V or 3V3 or something else): If the target board has large loads connected to the µC SPI pins, those can interfere with programming. If it's just a logic-level SPI device, there should be no worries. Second, the SPI device will be exposed to the programming signals which may cause it some confusion, usually nothing that bouncing the power wouldn't fix if it ends up in some weird state, but if it tries to talk to the µC while programming is occurring, that would probably be an issue.

Don't forget to connect the GNDs.

Some programmers, like Atmel's AVR ISP MKii, also sense the voltage on the ICSP power header and adjust the signal levels accordingly.

Hi,
and thanks eveybody for your feedback! trying to give you back mine:

@Jack Christensen: yep, I will have just a logic-level SPI device, so it should go fine. Anyhow, what do you mean by "bouncing the power" ? Just proper decoupling? I had in mind also to connect the SPI device VCC to main supply via a solder joint, so that I can program my MCU without having the device powered, and after that close the joint. But if not strictly needed, I would prefer to avoid it

@Coding Badly: of course! but it's always a good suggestion / thing to remember. In the past I had some issued because of that, so I should remember well!

@CrossRoads: I've read it but I would prefer to avoid buying a new programmer... being 2/3 boards max I prefer, if possible, to use my seeeduino in order to program the target MCU

Thanks again to everybody, as soon as I can do some tests I will post here the results; in the meanwhile if there is any other suggestion, it's always welcome!

Bounce = turn off then on again (to reset everything).