Voltage divider for 3.3V ISP voltage

I have an Arduino uno which is a 5volts device.
I am planning to use this arduino to burn the bootloader to my atmega328p IC.
The problem is, there is another component on the whole PCB and it cannot tolerate 5Volts.

So, if I simply used voltage dividers for each ISP pin, would it work?

Maybe...

You usually don't use voltage dividers on data lines (and they don't work at all for power connections). There are "level shifter" chips designed for this purpose, and of course voltage regulators for power-voltage reduction.

If there's any load or unknown impedance on the line it will foul-up your voltage divider calculations. If its connected directly to the ATmega chip and nothing else, the ATmega chip presents a very-high impedance and the voltage shouldn't be affected.

Have you used your ISP before? Personally, I wouldn't try this unless your ISP programming set-up is confirmed working normally with a normal 5V circuit. Otherwise, if it doesn't work you won't know if your problems are related to your voltage dividers or something else.

A simple resistive voltage divider will not work unless
you include a capacitor divider as well.
Remember, the input capacitance of the input is
in parallel with the bottom capacitor that is parallel
with the bottom grounded resistor.
It often helps to use capacitors that are large enough
to not have a significant issue with the input capacitance
not being exactly unknown.
Dwight

It would probably be better to connect and power the Uno from 3V3 from a 3V3 or switchable 5/3V3 FTDI basic instead of its built-in USB port, that way everything is at 3V3. Apply 3V3 power to the Uno through the 5V pin. It runs at 3V3 fine.

A 74LVC245 is what I have. I only use it to drive my
3.3v stuff from a 5V I/O.
Dwight

Uhm, why make it hard? Voltage divider for the data lines is fine... The impedance of the inputs is high enough. Most level shifting bread out boards just use a resistor divider for the high to low data. But you have to be sure not to use a voltage divider for the power/Vcc line. Use a regulator there. Also, just connect the output of the single IC direct to the Arduino because it will output 3,3V and the Arduino will happily accept that.

What data rate are you using and what size resistors?
Dwight

The board I could find the first had a divider with 10k and 20k on it. But why should there be a problem? The load is low and it’s just a resistor… That’s even simpler then a transistor to drive…

Your resistor divider, driving a 15 pf load has a time constant
of about 0.1 us. Add some wiring and you lose some more.
It is unlikely to do well with anything over a few megahertz.
It is not only resistive load you have to watch.
Low frequency shouldn't be an issue.
Dwight

So, for simple programming I don't see any problems... It's a filter for 42Mhz @ 15pF! And the input capacity is probably even lower. It's even a AVR guideline to have a resistor inline with SPI devices so the programmer can take control. So no, I see not a single problem in using a resistor to drop MOSI and clock line from 5V to 3,3V.

The clock isn't so much a problem except the first edge.
anything over 7Mhz will not cause a transition of 50% on the first
cycle. 4 Mhz is marginal. SPI is not a continuous clock.
Data is a problem as will it needs to set up in .07 micro seconds
for a 50% change from zero.
Dwight

dwightthinker:
A simple resistive voltage divider will not work unless
you include a capacitor divider as well.
Remember, the input capacitance of the input is
in parallel with the bottom capacitor that is parallel
with the bottom grounded resistor.
It often helps to use capacitors that are large enough
to not have a significant issue with the input capacitance
not being exactly unknown.
Dwight

According to this article, if I am not mistaken, for uni-directional conversions from 5V to 3.3V this Logic level shifter simply uses voltage dividers. Am I missing something?

https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

That is a four channel converter. 2 of the channels are one direction from 5v to 3.3V using voltage dividers, and 2 of the channels use a transistor so they can step up from 3.3V up to 5V or step down from 5V to 3.3V. They also have a version of the board with 4 channel bi-directional:

Are you thinking of buying something to solve the problem you opened this thread for, or you happen to have one of those on hand?

dmjlambert:
That is a four channel converter. 2 of the channels are one direction from 5v to 3.3V using voltage dividers, and 2 of the channels use a transistor so they can step up from 3.3V up to 5V or step down from 5V to 3.3V. They also have a version of the board with 4 channel bi-directional:

https://www.sparkfun.com/products/12009

Are you thinking of buying something to solve the problem you opened this thread for, or you happen to have one of those on hand?

No, I don't have any such hardware.
What I need is stepping down from 5V to 3.3V, that's why I asked if a voltage divider could be the solution.

Yes, if the connections are one way, stepping down from 5 to 3.3 and there is no logic running the other way, from 3.3 to 5, voltage divider may work. If some of the connections go from 3.3 to 5, you can usually just skip level conversion for those, because a 3.3V high signal sent from a device is usually considered "high enough" for a 5V device to consider the signal to be high.

I don't know what direction the various signals for ISP go because I haven't studied it to that level before. I've just used the programmer and target both set for 3.3V so I didn't have to worry about it. I have a 3.3V Pro Mini and serial adapter for it, for when I do things like this.

I would imagine the ATmega328P data sheet would be a good place to start figuring out that stuff. Or if you choose to try one of those 4 channel bi-directional converters, just hook it up and enjoy. I have some of those and they are very inexpensive and handy to have. I haven't used one with ISP pins yet, just for other things such as TTL serial.

zoom:
According to this article, if I am not mistaken, for uni-directional conversions from 5V to 3.3V this Logic level shifter simply uses voltage dividers. Am I missing something?

https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

The problem I was talking about is that the input to the chip is
a capacitor. Using a resistor divider means, you have created
an RC circuit.
The timing of this circuit is related to the fastest pulse you can pass.
The values the other poster gave are quite high compared to the
capacitive load and at around 7MHz pulse, will likely fail.
4MHz is marginal.
Notice that things like the SPI clock are really pulses and not continuous
clocks. I2C is much slower and usually not an issue.
Rise time is the issue.
To counter this, one can parallel the top resistor with a capacitor in the same
ratio as the resistive divider to the know input capacitance.
Typically the manufactures input capacitance is a maximum.
That doesn't include board capacitance though.
A resistor divider by it self is just that, a resistive divider. Such a divider
into a component input is an RC circuit.
Dwight

The outputs are Reset, SCK and MOSI. These need to be shifted from 5V to 3.3V.
The input is MISO. It can probably be left alone and will still be read as high by the 5V side.

I don't see why it wouldn't work. It may be speed limited for the reason Dwight is saying but you have control over the speed of the programming operation.

Level shifters make more sense. Maybe it's time to order a few.

How would speed control of the programming operation be accomplished? Is it a matter of editing ArduinoISP sketch?

If that's the sketch that's being used, then yes.

Use lower values of resistor in the divider. That will make the circuit
faster.
You should not over drive a 3.3v parts input with 5v. Since the
output of most of the parts are CMOS and not actually TTL, they are
rail to rail.
A 3.3V CMOS drive produces a valid TTL level on a 5v parts input.
The only place there is an issue is driving a 3.3v input from a full rail
CMOS 5v output.
A resistor divider of 560 ohms and 1000 ohms is only a little over
3 ma from the driver and has no speed issues at SPI speeds.
Dwight